-
Notifications
You must be signed in to change notification settings - Fork 88
/
Copy pathschema.graphql
438 lines (357 loc) · 7.84 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
scalar JSON
scalar Date
# see https://docs.hasura.io/1.0/graphql/manual/queries/query-filters.html
input String_Selector {
_eq: String
#_gt: String
#_gte: String
#_ilike: String
_in: [String!]
_is_null: Boolean
_like: String
#_lt: String
#_lte: String
#_neq: String
#_nilike: String
#_nin: [String!]
#_nlike: String
#_nsimilar: String
#_similar: String
}
input String_Array_Selector {
_in: [String!]
_contains: String
# _contains_all: [String_Selector]
}
input Int_Selector {
_eq: Int
_gt: Int
_gte: Int
_in: [Int!]
#_is_null: Boolean
_lt: Int
_lte: Int
#_neq: Int
#_nin: [Int!]
}
input Int_Array_Selector {
contains: Int_Selector
# contains_all: [Int_Selector]
}
input Float_Selector {
_eq: Float
_gt: Float
_gte: Float
_in: [Float!]
#_is_null: Boolean
_lt: Float
_lte: Float
#_neq: Float
#_nin: [Float!]
}
input Float_Array_Selector {
contains: Float_Selector
# contains_all: [Float_Selector]
}
input Boolean_Selector {
_eq: Boolean
#_neq: Boolean
}
input Boolean_Array_Selector {
contains: Boolean_Selector
# contains_all: [Boolean_Selector]
}
input Date_Selector {
_eq: Date
_gt: Date
_gte: Date
_in: [Date!]
#_is_null: Boolean
_lt: Date
_lte: Date
#_neq: Date
#_nin: [Date!]
}
input Date_Array_Selector {
contains: Date_Selector
# contains_all: [Date_Selector]
}
# column ordering options
enum SortOptions {
asc
desc
}
input OptionsInput {
# Whether to enable caching for this query
enableCache: Boolean
# For single document queries, return null instead of throwing MissingDocumentError
allowNull: Boolean
}
type Site {
title: String
url: String
logoUrl: String
sourceVersion: String
}
type IntlValue {
locale: String
value: String
}
input IntlValueInput{
locale: String
value: String
}
directive @intl on FIELD_DEFINITION
type Locale {
id: String,
label: String
dynamic: Boolean
strings: JSON
}
input AuthPasswordInput {
email: String
password: String
}
type AuthResult {
token: String
userId: String
}
type LogoutResult {
userId: String
}
input SignupInput {
email: String
password: String
}
type SignupResult {
userId: String
}
input SetPasswordInput {
newPassword: String
}
#type SetPasswordResult # Will auth user again so we reuse AuthResult atm
input ResetPasswordInput {
token: String
newPassword: String
}
type ResetPasswordResult {
userId: String
}
input VerifyEmailInput {
token: String
}
type VerifyEmailResult {
userId: String
}
input AuthEmailInput {
email: String
}
type Step {
step: Int
completed: Boolean
progress: [Boolean]
title: String
}
# A user object
type User {
_id: String
username: String
emails: [JSON]
createdAt: Date
isAdmin: Boolean
locale: String
profile: JSON
services: JSON
displayName: String
email: String
emailHash: String
avatarUrl: String
slug: String
groups: [String]
pageUrl: String
pagePath: String
editUrl: String
createdAtFormatted(format: String = "YYYY/MM/DD"): String
}
input DeleteUserInput{
filter: UserFilterInput
id: String
}
input SingleUserInput {
# filtering
filter: UserFilterInput
sort: UserSortInput
search: String
id: String
# backwards-compatibility
# Deprecated (use 'filter/id' fields instead).
selector: UserSelectorUniqueInput
# options (backwards-compatibility)
# Whether to enable caching for this query
enableCache: Boolean
# Return null instead of throwing MissingDocumentError
allowNull: Boolean
# An identifier to name the query's execution context
contextName: String
}
input MultiUserInput {
# filtering
filter: UserFilterInput
sort: UserSortInput
search: String
offset: Int
limit: Int
# backwards-compatibility
# A JSON object that contains the query terms used to fetch data
# Deprecated (use 'filter/id' fields instead).
terms: JSON
# options (backwards-compatibility)
# Whether to enable caching for this query
enableCache: Boolean
# Whether to calculate totalCount for this query
enableTotal: Boolean
# An identifier to name the query's execution context
contextName: String
}
type SingleUserOutput{
result: User
}
type MultiUserOutput{
results: [User]
totalCount: Int
}
type UserMutationOutput{
data: User
}
input CreateUserInput {
data: CreateUserDataInput!
# An identifier to name the mutation's execution context
contextName: String
}
input CreateUserDataInput {
username: String
isAdmin: Boolean
locale: String
profile: JSON
displayName: String
email: String
groups: [String]
}
input UpdateUserInput{
filter: UserFilterInput
id: String
data: UpdateUserDataInput!
# An identifier to name the mutation's execution context
contextName: String
}
input UpsertUserInput{
filter: UserFilterInput
id: String
data: UpdateUserDataInput!
# An identifier to name the mutation's execution context
contextName: String
}
input UpdateUserDataInput {
username: String
isAdmin: Boolean
locale: String
displayName: String
email: String
groups: [String]
}
input UserFilterInput {
_and: [UserFilterInput]
_not: UserFilterInput
_or: [UserFilterInput]
_id: String_Selector
username: String_Selector
createdAt: Date_Selector
isAdmin: Boolean_Selector
locale: String_Selector
displayName: String_Selector
email: String_Selector
emailHash: String_Selector
avatarUrl: String_Selector
slug: String_Selector
groups: String_Array_Selector
pageUrl: String_Selector
pagePath: String_Selector
editUrl: String_Selector
}
input UserSortInput {
_id: SortOptions
username: SortOptions
emails: SortOptions
createdAt: SortOptions
isAdmin: SortOptions
locale: SortOptions
services: SortOptions
displayName: SortOptions
email: SortOptions
emailHash: SortOptions
avatarUrl: SortOptions
slug: SortOptions
groups: SortOptions
pageUrl: SortOptions
pagePath: SortOptions
editUrl: SortOptions
}
input UserSelectorInput {
_and: [UserSelectorInput]
_or: [UserSelectorInput]
}
input UserSelectorUniqueInput {
_id: String
documentId: String # OpenCRUD backwards compatibility
slug: String
}
type Query {
siteData: Site
locale(localeId: String): Locale
currentUser: User
schemaContents: String
moviesCount: Int
steps: [Step]
# A single User document fetched by ID or slug
user(input: SingleUserInput!): SingleUserOutput
# A list of User documents matching a set of query terms
users(input: MultiUserInput): MultiUserOutput
}
type Mutation {
authenticateWithPassword(input: AuthPasswordInput): AuthResult
logout: LogoutResult
signup(input: SignupInput): SignupResult
setPassword(input: SetPasswordInput): AuthResult
sendResetPasswordEmail(input: AuthEmailInput): Boolean
resetPassword(input: ResetPasswordInput): ResetPasswordResult
sendVerificationEmail(input: AuthEmailInput): Boolean
verifyEmail(input: VerifyEmailInput): VerifyEmailResult
# Mutation for creating new User documents
createUser(
input: CreateUserInput,
# Deprecated (use 'input' field instead).
data: CreateUserDataInput
) : UserMutationOutput
# Mutation for updating a User document
updateUser(
input: UpdateUserInput,
# Deprecated (use 'input' field instead).
selector: UserSelectorUniqueInput,
# Deprecated (use 'input' field instead).
data: UpdateUserDataInput
) : UserMutationOutput
# Mutation for upserting a User document
upsertUser(
input: UpsertUserInput,
# Deprecated (use 'input' field instead).
selector: UserSelectorUniqueInput,
# Deprecated (use 'input' field instead).
data: UpdateUserDataInput
) : UserMutationOutput
# Mutation for deleting a User document
deleteUser(
input: DeleteUserInput,
# Deprecated (use 'input' field instead).
selector: UserSelectorUniqueInput
) : UserMutationOutput
}