-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathschema.graphql
453 lines (348 loc) · 10.8 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
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
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
# This file was generated based on ".graphqlconfig". Do not edit manually.
schema {
query: Query
mutation: Mutation
}
directive @postgres(name: String!) on OBJECT
directive @hasMetadata on OBJECT
directive @cmsObject on OBJECT
directive @tenantScoped on OBJECT
directive @connection on OBJECT | INTERFACE
directive @extends on OBJECT | INTERFACE
directive @external on FIELD_DEFINITION
directive @key(fields: _FieldSet!) on OBJECT | INTERFACE
directive @provides(fields: _FieldSet!) on FIELD_DEFINITION
directive @requires(fields: _FieldSet!) on FIELD_DEFINITION
interface Node {
id: ID!
}
type DeletePageResponse {
affectedRows: Int
}
type DeleteProductResponse {
affectedRows: Int
}
type Mutation {
createPage(input: CreatePageInput!): Page
createProduct(input: CreateProductInput!): Product
deletePage(where: [PageConditionInput!]): DeletePageResponse
deleteProduct(where: [ProductConditionInput!]): DeleteProductResponse
updatePage(input: UpdatePageInput, where: [PageConditionInput!]): UpdatePageResponse
updateProduct(input: UpdateProductInput, where: [ProductConditionInput!]): UpdateProductResponse
}
type Page implements Node {
description: HTML!
id: ID!
title: String!
}
type PageConnection {
edges: [PageEdge]
pageInfo: PageInfo!
}
type PageEdge {
cursor: String!
node: Product
}
type PageInfo {
endCursor: String
hasNextPage: Boolean!
hasPreviousPage: Boolean!
startCursor: String
}
type Product implements Node {
description: HTML!
id: ID!
title: String!
}
type ProductConnection {
edges: [ProductEdge]
pageInfo: PageInfo!
}
type ProductEdge {
cursor: String!
node: Product
}
type Query {
_service: _Service
pages(after: String, before: String, first: Int, last: Int, where: PageConditionInput): PageConnection
products(after: String, before: String, first: Int, last: Int, where: ProductConditionInput): ProductConnection
}
type UpdatePageResponse {
affectedRows: Int
}
type UpdateProductResponse {
affectedRows: Int
}
type _Service {
sdl: String!
}
enum ErrorDetail {
"""
The deadline expired before the operation could complete.
For operations that change the state of the system, this error
may be returned even if the operation has completed successfully.
For example, a successful response from a server could have been
delayed long enough for the deadline to expire.
HTTP Mapping: 504 Gateway Timeout
Error Type: UNAVAILABLE
"""
DEADLINE_EXCEEDED
"""
The server detected that the client is exhibiting a behavior that
might be generating excessive load.
HTTP Mapping: 429 Too Many Requests or 420 Enhance Your Calm
Error Type: UNAVAILABLE
"""
ENHANCE_YOUR_CALM
"""
The requested field is not found in the schema.
This differs from `NOT_FOUND` in that `NOT_FOUND` should be used when a
query is valid, but is unable to return a result (if, for example, a
specific video id doesn't exist). `FIELD_NOT_FOUND` is intended to be
returned by the server to signify that the requested field is not known to exist.
This may be returned in lieu of failing the entire query.
See also `PERMISSION_DENIED` for cases where the
requested field is invalid only for the given user or class of users.
HTTP Mapping: 404 Not Found
Error Type: BAD_REQUEST
"""
FIELD_NOT_FOUND
"""
The client specified an invalid argument.
Note that this differs from `FAILED_PRECONDITION`.
`INVALID_ARGUMENT` indicates arguments that are problematic
regardless of the state of the system (e.g., a malformed file name).
HTTP Mapping: 400 Bad Request
Error Type: BAD_REQUEST
"""
INVALID_ARGUMENT
"""
The provided cursor is not valid.
The most common usage for this error is when a client is paginating
through a list that uses stateful cursors. In that case, the provided
cursor may be expired.
HTTP Mapping: 404 Not Found
Error Type: NOT_FOUND
"""
INVALID_CURSOR
"""
Unable to perform operation because a required resource is missing.
Example: Client is attempting to refresh a list, but the specified
list is expired. This requires an action by the client to get a new list.
If the user is simply trying GET a resource that is not found,
use the NOT_FOUND error type. FAILED_PRECONDITION.MISSING_RESOURCE
is to be used particularly when the user is performing an operation
that requires a particular resource to exist.
HTTP Mapping: 400 Bad Request or 500 Internal Server Error
Error Type: FAILED_PRECONDITION
"""
MISSING_RESOURCE
"""
Service Error.
There is a problem with an upstream service.
This may be returned if a gateway receives an unknown error from a service
or if a service is unreachable.
If a request times out which waiting on a response from a service,
`DEADLINE_EXCEEDED` may be returned instead.
If a service returns a more specific error Type, the specific error Type may
be returned instead.
HTTP Mapping: 502 Bad Gateway
Error Type: UNAVAILABLE
"""
SERVICE_ERROR
"""
Request failed due to network errors.
HTTP Mapping: 503 Unavailable
Error Type: UNAVAILABLE
"""
TCP_FAILURE
"""
Request throttled based on server concurrency limits.
HTTP Mapping: 503 Unavailable
Error Type: UNAVAILABLE
"""
THROTTLED_CONCURRENCY
"""
Request throttled based on server CPU limits
HTTP Mapping: 503 Unavailable.
Error Type: UNAVAILABLE
"""
THROTTLED_CPU
"""
The operation is not implemented or is not currently supported/enabled.
HTTP Mapping: 501 Not Implemented
Error Type: BAD_REQUEST
"""
UNIMPLEMENTED
"""
Unknown error.
This error should only be returned when no other error detail applies.
If a client sees an unknown errorDetail, it will be interpreted as UNKNOWN.
HTTP Mapping: 500 Internal Server Error
"""
UNKNOWN
}
enum ErrorType {
"""
Bad Request.
There is a problem with the request.
Retrying the same request is not likely to succeed.
An example would be a query or argument that cannot be deserialized.
HTTP Mapping: 400 Bad Request
"""
BAD_REQUEST
"""
The operation was rejected because the system is not in a state
required for the operation's execution. For example, the directory
to be deleted is non-empty, an rmdir operation is applied to
a non-directory, etc.
Service implementers can use the following guidelines to decide
between `FAILED_PRECONDITION` and `UNAVAILABLE`:
- Use `UNAVAILABLE` if the client can retry just the failing call.
- Use `FAILED_PRECONDITION` if the client should not retry until
the system state has been explicitly fixed. E.g., if an "rmdir"
fails because the directory is non-empty, `FAILED_PRECONDITION`
should be returned since the client should not retry unless
the files are deleted from the directory.
HTTP Mapping: 400 Bad Request or 500 Internal Server Error
"""
FAILED_PRECONDITION
"""
Internal error.
An unexpected internal error was encountered. This means that some
invariants expected by the underlying system have been broken.
This error code is reserved for serious errors.
HTTP Mapping: 500 Internal Server Error
"""
INTERNAL
"""
The requested entity was not found.
This could apply to a resource that has never existed (e.g. bad resource id),
or a resource that no longer exists (e.g. cache expired.)
Note to server developers: if a request is denied for an entire class
of users, such as gradual feature rollout or undocumented allowlist,
`NOT_FOUND` may be used. If a request is denied for some users within
a class of users, such as user-based access control, `PERMISSION_DENIED`
must be used.
HTTP Mapping: 404 Not Found
"""
NOT_FOUND
"""
The caller does not have permission to execute the specified
operation.
`PERMISSION_DENIED` must not be used for rejections
caused by exhausting some resource or quota.
`PERMISSION_DENIED` must not be used if the caller
cannot be identified (use `UNAUTHENTICATED`
instead for those errors).
This error Type does not imply the
request is valid or the requested entity exists or satisfies
other pre-conditions.
HTTP Mapping: 403 Forbidden
"""
PERMISSION_DENIED
"""
The request does not have valid authentication credentials.
This is intended to be returned only for routes that require
authentication.
HTTP Mapping: 401 Unauthorized
"""
UNAUTHENTICATED
"""
Currently Unavailable.
The service is currently unavailable. This is most likely a
transient condition, which can be corrected by retrying with
a backoff.
HTTP Mapping: 503 Unavailable
"""
UNAVAILABLE
"""
Unknown error.
For example, this error may be returned when
an error code received from another address space belongs to
an error space that is not known in this address space. Also
errors raised by APIs that do not return enough error information
may be converted to this error.
If a client sees an unknown errorType, it will be interpreted as UNKNOWN.
Unknown errors MUST NOT trigger any special behavior. These MAY be treated
by an implementation as being equivalent to INTERNAL.
When possible, a more specific error should be provided.
HTTP Mapping: 520 Unknown Error
"""
UNKNOWN
}
"An RFC-3339 compliant DateTime Scalar"
scalar DateTime
scalar HTML
scalar _FieldSet
input BooleanComparisonInput {
eq: Boolean
neq: Boolean
}
input CreatePageInput {
description: HTML!
id: ID
title: String!
}
input CreateProductInput {
description: HTML!
id: ID
title: String!
}
input DateTimeComparisonInput {
between: [DateTime!]
eq: DateTime
gt: DateTime
gte: DateTime
lt: DateTime
lte: DateTime
neq: DateTime
}
input FloatComparisonInput {
eq: Float
gt: Float
gte: Float
lt: Float
lte: Float
neq: Float
}
input IDComparisonInput {
eq: ID
neq: ID
}
input IntComparisonInput {
eq: Int
gt: Int
gte: Int
in: [Int!]
lt: Int
lte: Int
neq: Int
notIn: [Int!]
}
input PageConditionInput {
_and: [PageConditionInput]
_or: [PageConditionInput]
id: IDComparisonInput
title: StringComparisonInput
}
input ProductConditionInput {
_and: [ProductConditionInput]
_or: [ProductConditionInput]
id: IDComparisonInput
title: StringComparisonInput
}
input StringComparisonInput {
eq: String
in: [String!]
neq: String
notIn: [String!]
}
input UpdatePageInput {
description: HTML
title: String
}
input UpdateProductInput {
description: HTML
title: String
}