Files
Krow-workspace/backend/dataconnect/example/shift/mutations.gql

135 lines
2.3 KiB
GraphQL

mutation createShift(
$title: String!
$orderId: UUID!
$date: Timestamp
$startTime: Timestamp
$endTime: Timestamp
$hours: Float
$cost: Float
$location: String
$locationAddress: String
$latitude: Float
$longitude: Float
$placeId: String
$city: String
$state: String
$street: String
$country: String
$description: String
$status: ShiftStatus
$workersNeeded: Int
$filled: Int
$filledAt: Timestamp
$managers: [Any!]
$durationDays: Int
$createdBy: String
) @auth(level: USER) {
shift_insert(
data: {
title: $title
orderId: $orderId
date: $date
startTime: $startTime
endTime: $endTime
hours: $hours
cost: $cost
location: $location
locationAddress: $locationAddress
latitude: $latitude
longitude: $longitude
placeId: $placeId
city: $city
state: $state
street: $street
country: $country
description: $description
status: $status
workersNeeded: $workersNeeded
filled: $filled
filledAt: $filledAt
managers: $managers
durationDays: $durationDays
}
)
}
mutation updateShift(
$id: UUID!
$title: String
$orderId: UUID
$date: Timestamp
$startTime: Timestamp
$endTime: Timestamp
$hours: Float
$cost: Float
$location: String
$locationAddress: String
$latitude: Float
$longitude: Float
$placeId: String
$city: String
$state: String
$street: String
$country: String
$description: String
$status: ShiftStatus
$workersNeeded: Int
$filled: Int
$filledAt: Timestamp
$managers: [Any!]
$durationDays: Int
) @auth(level: USER) {
shift_update(
id: $id
data: {
title: $title
orderId: $orderId
date: $date
startTime: $startTime
endTime: $endTime
hours: $hours
cost: $cost
location: $location
locationAddress: $locationAddress
latitude: $latitude
longitude: $longitude
placeId: $placeId
city: $city
state: $state
street: $street
country: $country
description: $description
status: $status
workersNeeded: $workersNeeded
filled: $filled
filledAt: $filledAt
managers: $managers
durationDays: $durationDays
}
)
}
mutation deleteShift($id: UUID!) @auth(level: USER) {
shift_delete(id: $id)
}