-
Notifications
You must be signed in to change notification settings - Fork 12
/
schema.graphql
102 lines (87 loc) · 1.87 KB
/
schema.graphql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
##############
# Main model #
##############
type Worker {
id: ID!
name: String!
phone: AWSPhone!
role: String
}
#########################################
# Helper model for results of Lambda Fn #
#########################################
type NotifyResult {
result: String!
message: String
failures: [String]
}
############################################
# Aggregate type for supporting pagination #
############################################
type ModelWorkerConnection {
items: [Worker]
nextToken: String
}
#################################################
# Input Types for mutating and filtering models #
#################################################
input ModelStringFilterInput {
ne: String
eq: String
le: String
lt: String
ge: String
gt: String
contains: String
notContains: String
between: [String]
beginsWith: String
}
input ModelIDFilterInput {
ne: ID
eq: ID
le: ID
lt: ID
ge: ID
gt: ID
contains: ID
notContains: ID
between: [ID]
beginsWith: ID
}
input ModelWorkerFilterInput {
id: ModelIDFilterInput
name: ModelStringFilterInput
phone: ModelStringFilterInput
role: ModelStringFilterInput
and: [ModelWorkerFilterInput]
or: [ModelWorkerFilterInput]
not: ModelWorkerFilterInput
}
input CreateWorkerInput {
id: ID
name: String!
phone: AWSPhone!
role: String
}
input UpdateWorkerInput {
id: ID!
name: String
phone: AWSPhone
role: String
}
input DeleteWorkerInput {
id: ID!
}
################################
# Schema behavior declarations #
################################
type Query {
listWorkers(filter: ModelWorkerFilterInput, limit: Int, nextToken: String): ModelWorkerConnection
}
type Mutation {
createWorker(input: CreateWorkerInput!): Worker
updateWorker(input: UpdateWorkerInput!): Worker
deleteWorker(input: DeleteWorkerInput!): Worker
notifyWorker(id: ID!): NotifyResult
}