40 lines
707 B
GraphQL
40 lines
707 B
GraphQL
mutation CreateShift(
|
|
$shiftName: String!,
|
|
$startDate: Timestamp!,
|
|
$endDate: Timestamp,
|
|
$assignedStaff: String
|
|
) @auth(level: USER) {
|
|
shift_insert(
|
|
data: {
|
|
shiftName: $shiftName
|
|
startDate: $startDate
|
|
endDate: $endDate
|
|
assignedStaff: $assignedStaff
|
|
}
|
|
)
|
|
}
|
|
|
|
mutation UpdateShift(
|
|
$id: UUID!,
|
|
$shiftName: String,
|
|
$startDate: Timestamp,
|
|
$endDate: Timestamp,
|
|
$assignedStaff: String
|
|
) @auth(level: USER) {
|
|
shift_update(
|
|
id: $id,
|
|
data: {
|
|
shiftName: $shiftName
|
|
startDate: $startDate
|
|
endDate: $endDate
|
|
assignedStaff: $assignedStaff
|
|
}
|
|
)
|
|
}
|
|
|
|
mutation DeleteShift(
|
|
$id: UUID!
|
|
) @auth(level: USER) {
|
|
shift_delete(id: $id)
|
|
}
|