shift mutation file
This commit is contained in:
134
backend/dataconnect/connector/shift/mutations.gql
Normal file
134
backend/dataconnect/connector/shift/mutations.gql
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
|
||||||
|
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)
|
||||||
|
}
|
||||||
@@ -303,14 +303,19 @@ const dataconnectEntityConfig = {
|
|||||||
Order:{
|
Order:{
|
||||||
list: 'listOrder',
|
list: 'listOrder',
|
||||||
get: 'getOrderById',
|
get: 'getOrderById',
|
||||||
create: 'UpdateOrder',
|
create: 'createOrder',
|
||||||
update: 'updateEnterprise',
|
update: 'updateOrder',
|
||||||
delete: 'deleteEnterprise',
|
delete: 'deleteOrder',
|
||||||
filter: 'filterOrder',
|
filter: 'filterOrder',
|
||||||
},
|
},
|
||||||
|
|
||||||
Shift:{
|
Shift:{
|
||||||
|
list: 'listShifts',
|
||||||
|
get: 'getShiftById',
|
||||||
|
create: 'createShift',
|
||||||
|
update: 'updateShift',
|
||||||
|
delete: 'deleteShift',
|
||||||
|
filter: 'filterShifts',
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user