Started with Mongo

This commit is contained in:
Riccardo
2021-01-02 13:11:59 +01:00
parent 5294122f61
commit 30407cac0a
41 changed files with 33775 additions and 0 deletions

78
server/src/schema.graphql Normal file
View File

@@ -0,0 +1,78 @@
type Query {
info: String!
feed(
filter: String
skip: Int
take: Int
orderBy: AppointmentOrderByInput
): Feed!
}
type Feed {
id: ID!
appointments: [Appointment!]!
count: Int!
}
type Mutation {
createAppointment(
title: String!,
description: String!,
start: DateTime!,
end: DateTime!,
): Appointment!
signup(
email: String!
password: String!
name: String!
): AuthPayload
login(email: String!, password: String!): AuthPayload
follow(appointmentId: ID!): Follow
}
type Subscription {
newAppointment: Appointment
newFollow: Follow
}
type AuthPayload {
token: String
user: User
}
type User {
id: ID!
name: String!
email: String!
appointments: [Appointment!]!
}
type Appointment {
id: ID!
title: String!
description: String!
start: DateTime!
end: DateTime!
createdBy: User
follows: [Follow!]!
createdAt: DateTime!
}
type Follow {
id: ID!
appointment: Appointment!
user: User!
}
input AppointmentOrderByInput {
description: Sort
url: Sort
createdAt: Sort
}
enum Sort {
asc
desc
}
scalar DateTime