74 lines
1.1 KiB
GraphQL
74 lines
1.1 KiB
GraphQL
type Query {
|
|
info: String!
|
|
feed(
|
|
filter: String
|
|
skip: Int
|
|
take: Int
|
|
orderBy: AppointmentOrderByInput
|
|
): Feed!
|
|
allAppointments: [Appointment]
|
|
oneAppointment(_id: ID!): Appointment
|
|
}
|
|
|
|
type Feed {
|
|
id: ID!
|
|
appointments: [Appointment!]!
|
|
count: Int!
|
|
}
|
|
|
|
type Mutation {
|
|
createAppointment(
|
|
title: String!
|
|
description: String
|
|
type: String!
|
|
start: DateTime!
|
|
end: DateTime!
|
|
deleted: Boolean
|
|
): Appointment!
|
|
updateAppointment(
|
|
_id: ID!
|
|
title: String!
|
|
description: String
|
|
type: String!
|
|
start: DateTime!
|
|
end: DateTime!
|
|
deleted: Boolean
|
|
): Appointment
|
|
deleteAppointment(_id: ID!): Appointment
|
|
}
|
|
|
|
type Subscription {
|
|
newAppointment: Appointment
|
|
}
|
|
|
|
# Appointment schemas
|
|
type Appointment {
|
|
_id: ID!
|
|
title: String!
|
|
description: String
|
|
type: String!
|
|
start: DateTime!
|
|
end: DateTime!
|
|
deleted: Boolean
|
|
}
|
|
input AppointmentInput {
|
|
title: String!
|
|
description: String
|
|
type: String!
|
|
start: DateTime!
|
|
end: DateTime!
|
|
deleted: Boolean
|
|
}
|
|
input AppointmentOrderByInput {
|
|
title: Sort
|
|
desc: Sort
|
|
}
|
|
|
|
# General-purpose schemas
|
|
enum Sort {
|
|
asc
|
|
desc
|
|
}
|
|
scalar DateTime
|
|
scalar Time
|