mutation {
createUser(input: {
firstName: "John"
lastName: "Doe"
username: "johndoe"
email: "[email protected]"
password: "P4$$W0RD-3X4MPL3"
}) {
userId
firstName
lastName
username
email
}
}
mutation {
login(
email: "[email protected]"
password: "P4$$W0RD-3X4MPL3"
) {
email
token
}
}
Date/time accepted formats: YYYY-MM-DDTHH:mm
or YYYY-MM-DD HH:mm:ss
ATTENTION: Requires header x-access-token (token returned on login mutation)
mutation {
createReservation(input: {
roomId: "36f7b7de-aedb-40db-9593-1bc68cc71c3c"
start: "2021-01-05T08:00"
end: "2021-01-05T09:00"
}) {
reservationID
roomId
roomDescription
reservedBy
reservedByName
startAt
endAt
}
}
ATTENTION: Requires header x-access-token (token returned on login mutation)
mutation {
cancelReservation(
reservationId: "6b70c175-d930-4fab-8029-a7a3610b8131"
) {
status
}
}
Date/time accepted formats: YYYY-MM-DDTHH:mm
or YYYY-MM-DD HH:mm:ss
OBS: Parameters from and to are optional. If not informed, query will return all existing rooms)
query {
rooms(
from: "2021-01-05T09:00"
to: "2021-01-05T10:00"
) {
roomId
description
openAt
closeAt
}
}
Date accepted format: YYYY-MM-DD
OBS: Parameter date is optional. If not informed, query will return schedule for current day.
ATTENTION: Requires header x-access-token (token returned on login mutation)
query {
userSchedule(
date: "2020-01-05"
) {
date
schedule {
reservationId
roomId
roomDescription
reservedBy
reservedByName
startAt
endAt
}
}
}
Date accepted format: YYYY-MM-DD
OBS: Parameter date is optional. If not informed, query will return schedule for current day.
query {
roomSchedule(
roomId: "36f7b7de-aedb-40db-9593-1bc68cc71c3c"
date: "2020-01-05"
) {
date
schedule {
reservationId
roomId
roomDescription
reservedBy
reservedByName
startAt
endAt
}
}
}