best way to create schema with gql
This commit is contained in:
29
dataconnect/connector/event/mutations.gql
Normal file
29
dataconnect/connector/event/mutations.gql
Normal file
@@ -0,0 +1,29 @@
|
||||
mutation CreateEvent(
|
||||
$eventName: String!,
|
||||
$isRecurring: Boolean!,
|
||||
$recurrenceType: RecurrenceType,
|
||||
$businessId: UUID!,
|
||||
$vendorId: UUID,
|
||||
$status: EventStatus!,
|
||||
$date: Timestamp!,
|
||||
$shifts: String,
|
||||
$total: Float,
|
||||
$requested: Int,
|
||||
$assignedStaff: String
|
||||
) @auth(level: USER) {
|
||||
event_insert(
|
||||
data: {
|
||||
eventName: $eventName
|
||||
isRecurring: $isRecurring
|
||||
recurrenceType: $recurrenceType
|
||||
businessId: $businessId
|
||||
vendorId: $vendorId
|
||||
status: $status
|
||||
date: $date
|
||||
shifts: $shifts
|
||||
total: $total
|
||||
requested: $requested
|
||||
assignedStaff: $assignedStaff
|
||||
}
|
||||
)
|
||||
}
|
||||
14
dataconnect/connector/event/queries.gql
Normal file
14
dataconnect/connector/event/queries.gql
Normal file
@@ -0,0 +1,14 @@
|
||||
query listEvents @auth(level: USER) {
|
||||
events {
|
||||
id
|
||||
eventName
|
||||
status
|
||||
date
|
||||
isRecurring
|
||||
recurrenceType
|
||||
businessId
|
||||
vendorId
|
||||
total
|
||||
requested
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user