-
Notifications
You must be signed in to change notification settings - Fork 199
/
SchemaTests.SchemaChanged.graphql
348 lines (296 loc) · 12.2 KB
/
SchemaTests.SchemaChanged.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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
schema {
query: Query
mutation: Mutation
subscription: Subscription
}
interface Error {
message: String!
}
"The node interface is implemented by entities that have a global unique identifier."
interface Node {
id: ID!
}
type AddSessionPayload {
session: Session
errors: [AddSessionError!]
}
type AddSpeakerPayload {
speaker: Speaker
}
type AddTrackPayload {
track: Track
}
type Attendee implements Node {
sessions: [Session!]! @cost(weight: "10")
id: ID!
firstName: String!
lastName: String!
username: String!
emailAddress: String
}
"A connection to a list of items."
type AttendeesConnection {
"Information to aid in pagination."
pageInfo: PageInfo!
"A list of edges."
edges: [AttendeesEdge!]
"A flattened list of the nodes."
nodes: [Attendee!]
}
"An edge in a connection."
type AttendeesEdge {
"A cursor for use in pagination."
cursor: String!
"The item at the end of the edge."
node: Attendee!
}
type CheckInAttendeePayload {
attendee: Attendee
}
type EndTimeInvalidError implements Error {
message: String!
}
type Mutation {
registerAttendee(input: RegisterAttendeeInput!): RegisterAttendeePayload! @cost(weight: "10")
checkInAttendee(input: CheckInAttendeeInput!): CheckInAttendeePayload! @cost(weight: "10")
addSession(input: AddSessionInput!): AddSessionPayload! @cost(weight: "10")
scheduleSession(input: ScheduleSessionInput!): ScheduleSessionPayload! @cost(weight: "10")
addSpeaker(input: AddSpeakerInput!): AddSpeakerPayload! @cost(weight: "10")
addTrack(input: AddTrackInput!): AddTrackPayload! @cost(weight: "10")
renameTrack(input: RenameTrackInput!): RenameTrackPayload! @cost(weight: "10")
}
type NoSpeakerError implements Error {
message: String!
}
"Information about pagination in a connection."
type PageInfo {
"Indicates whether more edges exist following the set defined by the clients arguments."
hasNextPage: Boolean!
"Indicates whether more edges exist prior the set defined by the clients arguments."
hasPreviousPage: Boolean!
"When paginating backwards, the cursor to continue."
startCursor: String
"When paginating forwards, the cursor to continue."
endCursor: String
}
type Query {
"Fetches an object given its ID."
node("ID of the object." id: ID!): Node @cost(weight: "10")
"Lookup nodes by a list of IDs."
nodes("The list of node IDs." ids: [ID!]!): [Node]! @cost(weight: "10")
attendees("Returns the first _n_ elements from the list." first: Int "Returns the elements in the list that come after the specified cursor." after: String "Returns the last _n_ elements from the list." last: Int "Returns the elements in the list that come before the specified cursor." before: String): AttendeesConnection @listSize(assumedSize: 50, slicingArguments: [ "first", "last" ], sizedFields: [ "edges", "nodes" ], requireOneSlicingArgument: false) @cost(weight: "10")
attendeeById(id: ID!): Attendee @cost(weight: "10")
attendeesById(ids: [ID!]!): [Attendee!]! @cost(weight: "10")
sessions("Returns the first _n_ elements from the list." first: Int "Returns the elements in the list that come after the specified cursor." after: String "Returns the last _n_ elements from the list." last: Int "Returns the elements in the list that come before the specified cursor." before: String where: SessionFilterInput @cost(weight: "10") order: [SessionSortInput!] @cost(weight: "10")): SessionsConnection @listSize(assumedSize: 50, slicingArguments: [ "first", "last" ], sizedFields: [ "edges", "nodes" ], requireOneSlicingArgument: false) @cost(weight: "10")
sessionById(id: ID!): Session @cost(weight: "10")
sessionsById(ids: [ID!]!): [Session!]! @cost(weight: "10")
speakers("Returns the first _n_ elements from the list." first: Int "Returns the elements in the list that come after the specified cursor." after: String "Returns the last _n_ elements from the list." last: Int "Returns the elements in the list that come before the specified cursor." before: String): SpeakersConnection @listSize(assumedSize: 50, slicingArguments: [ "first", "last" ], sizedFields: [ "edges", "nodes" ], requireOneSlicingArgument: false) @cost(weight: "10")
speakerById(id: ID!): Speaker @cost(weight: "10")
speakersById(ids: [ID!]!): [Speaker!]! @cost(weight: "10")
tracks("Returns the first _n_ elements from the list." first: Int "Returns the elements in the list that come after the specified cursor." after: String "Returns the last _n_ elements from the list." last: Int "Returns the elements in the list that come before the specified cursor." before: String): TracksConnection @listSize(assumedSize: 50, slicingArguments: [ "first", "last" ], sizedFields: [ "edges", "nodes" ], requireOneSlicingArgument: false) @cost(weight: "10")
trackById(id: ID!): Track @cost(weight: "10")
tracksById(ids: [ID!]!): [Track!]! @cost(weight: "10")
}
type RegisterAttendeePayload {
attendee: Attendee
}
type RenameTrackPayload {
track: Track
errors: [RenameTrackError!]
}
type ScheduleSessionPayload {
session: Session
errors: [ScheduleSessionError!]
}
type Session implements Node {
duration: TimeSpan!
speakers: [Speaker!]! @cost(weight: "10")
attendees: [Attendee!]! @cost(weight: "10")
track: Track @cost(weight: "10")
trackId: ID
id: ID!
title: String!
abstract: String
startTime: DateTime
endTime: DateTime
}
type SessionAttendeeCheckIn {
checkInCount: Int! @cost(weight: "10")
attendee: Attendee! @cost(weight: "10")
session: Session! @cost(weight: "10")
attendeeId: ID!
sessionId: ID!
}
type SessionNotFoundError implements Error {
message: String!
}
"A connection to a list of items."
type SessionsConnection {
"Information to aid in pagination."
pageInfo: PageInfo!
"A list of edges."
edges: [SessionsEdge!]
"A flattened list of the nodes."
nodes: [Session!]
}
"An edge in a connection."
type SessionsEdge {
"A cursor for use in pagination."
cursor: String!
"The item at the end of the edge."
node: Session!
}
type Speaker implements Node {
sessions: [Session!]! @cost(weight: "10")
id: ID!
name: String!
bio: String
website: String
}
"A connection to a list of items."
type SpeakersConnection {
"Information to aid in pagination."
pageInfo: PageInfo!
"A list of edges."
edges: [SpeakersEdge!]
"A flattened list of the nodes."
nodes: [Speaker!]
}
"An edge in a connection."
type SpeakersEdge {
"A cursor for use in pagination."
cursor: String!
"The item at the end of the edge."
node: Speaker!
}
type Subscription {
onAttendeeCheckedIn(sessionId: ID!): SessionAttendeeCheckIn! @cost(weight: "10")
onSessionScheduled: Session! @cost(weight: "10")
}
type TitleEmptyError implements Error {
message: String!
}
type Track implements Node {
sessions("Returns the first _n_ elements from the list." first: Int "Returns the elements in the list that come after the specified cursor." after: String "Returns the last _n_ elements from the list." last: Int "Returns the elements in the list that come before the specified cursor." before: String): SessionsConnection @listSize(assumedSize: 50, slicingArguments: [ "first", "last" ], sizedFields: [ "edges", "nodes" ], requireOneSlicingArgument: false) @cost(weight: "10")
name: String!
id: ID!
}
type TrackNotFoundError implements Error {
message: String!
}
"A connection to a list of items."
type TracksConnection {
"Information to aid in pagination."
pageInfo: PageInfo!
"A list of edges."
edges: [TracksEdge!]
"A flattened list of the nodes."
nodes: [Track!]
}
"An edge in a connection."
type TracksEdge {
"A cursor for use in pagination."
cursor: String!
"The item at the end of the edge."
node: Track!
}
union AddSessionError = TitleEmptyError | NoSpeakerError
union RenameTrackError = TrackNotFoundError
union ScheduleSessionError = EndTimeInvalidError | SessionNotFoundError
input AddSessionInput {
title: String!
abstract: String
speakerIds: [ID!]!
}
input AddSpeakerInput {
name: String!
bio: String
website: String
}
input AddTrackInput {
name: String!
}
input CheckInAttendeeInput {
sessionId: ID!
attendeeId: ID!
}
input DateTimeOperationFilterInput {
eq: DateTime @cost(weight: "10")
neq: DateTime @cost(weight: "10")
in: [DateTime] @cost(weight: "10")
nin: [DateTime] @cost(weight: "10")
gt: DateTime @cost(weight: "10")
ngt: DateTime @cost(weight: "10")
gte: DateTime @cost(weight: "10")
ngte: DateTime @cost(weight: "10")
lt: DateTime @cost(weight: "10")
nlt: DateTime @cost(weight: "10")
lte: DateTime @cost(weight: "10")
nlte: DateTime @cost(weight: "10")
}
input RegisterAttendeeInput {
firstName: String!
lastName: String!
username: String!
emailAddress: String!
}
input RenameTrackInput {
id: ID!
name: String!
}
input ScheduleSessionInput {
sessionId: ID!
trackId: ID!
startTime: DateTime!
endTime: DateTime!
}
input SessionFilterInput {
and: [SessionFilterInput!]
or: [SessionFilterInput!]
title: StringOperationFilterInput
abstract: StringOperationFilterInput
startTime: DateTimeOperationFilterInput
endTime: DateTimeOperationFilterInput
}
input SessionSortInput {
id: SortEnumType @cost(weight: "10")
title: SortEnumType @cost(weight: "10")
abstract: SortEnumType @cost(weight: "10")
startTime: SortEnumType @cost(weight: "10")
endTime: SortEnumType @cost(weight: "10")
duration: SortEnumType @cost(weight: "10")
trackId: SortEnumType @cost(weight: "10")
track: TrackSortInput @cost(weight: "10")
}
input StringOperationFilterInput {
and: [StringOperationFilterInput!]
or: [StringOperationFilterInput!]
eq: String @cost(weight: "10")
neq: String @cost(weight: "10")
contains: String @cost(weight: "20")
ncontains: String @cost(weight: "20")
in: [String] @cost(weight: "10")
nin: [String] @cost(weight: "10")
startsWith: String @cost(weight: "20")
nstartsWith: String @cost(weight: "20")
endsWith: String @cost(weight: "20")
nendsWith: String @cost(weight: "20")
}
input TrackSortInput {
id: SortEnumType @cost(weight: "10")
name: SortEnumType @cost(weight: "10")
}
enum SortEnumType {
ASC
DESC
}
"The purpose of the `cost` directive is to define a `weight` for GraphQL types, fields, and arguments. Static analysis can use these weights when calculating the overall cost of a query or response."
directive @cost("The `weight` argument defines what value to add to the overall cost for every appearance, or possible appearance, of a type, field, argument, etc." weight: String!) on SCALAR | OBJECT | FIELD_DEFINITION | ARGUMENT_DEFINITION | ENUM | INPUT_FIELD_DEFINITION
"The purpose of the `@listSize` directive is to either inform the static analysis about the size of returned lists (if that information is statically available), or to point the analysis to where to find that information."
directive @listSize("The `assumedSize` argument can be used to statically define the maximum length of a list returned by a field." assumedSize: Int "The `slicingArguments` argument can be used to define which of the field's arguments with numeric type are slicing arguments, so that their value determines the size of the list returned by that field. It may specify a list of multiple slicing arguments." slicingArguments: [String!] "The `sizedFields` argument can be used to define that the value of the `assumedSize` argument or of a slicing argument does not affect the size of a list returned by a field itself, but that of a list returned by one of its sub-fields." sizedFields: [String!] "The `requireOneSlicingArgument` argument can be used to inform the static analysis that it should expect that exactly one of the defined slicing arguments is present in a query. If that is not the case (i.e., if none or multiple slicing arguments are present), the static analysis may throw an error." requireOneSlicingArgument: Boolean! = true) on FIELD_DEFINITION
"The `@specifiedBy` directive is used within the type system definition language to provide a URL for specifying the behavior of custom scalar definitions."
directive @specifiedBy("The specifiedBy URL points to a human-readable specification. This field will only read a result for scalar types." url: String!) on SCALAR
"The `DateTime` scalar represents an ISO-8601 compliant date time type."
scalar DateTime @specifiedBy(url: "https:\/\/www.graphql-scalars.com\/date-time")
"The `TimeSpan` scalar represents an ISO-8601 compliant duration type."
scalar TimeSpan