-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.graphql
735 lines (611 loc) · 13.2 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
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
schema {
query: query_root
mutation: mutation_root
subscription: subscription_root
}
"""whether this query should be cached (Hasura Cloud only)"""
directive @cached(
"""measured in seconds"""
ttl: Int! = 60
"""refresh the cache entry"""
refresh: Boolean! = false
) on QUERY
"""
columns and relationships of "articles"
"""
type Articles implements Node {
authorId: uuid!
body: String!
createdAt: timestamptz!
id: ID!
intro: String!
updatedAt: timestamptz!
}
"""
Boolean expression to filter rows from the table "articles". All fields are combined with a logical 'AND'.
"""
input ArticlesBoolExp {
_and: [ArticlesBoolExp!]
_not: ArticlesBoolExp
_or: [ArticlesBoolExp!]
authorId: UuidComparisonExp
body: StringComparisonExp
createdAt: TimestamptzComparisonExp
id: UuidComparisonExp
intro: StringComparisonExp
updatedAt: TimestamptzComparisonExp
}
"""
A Relay connection object on "articles"
"""
type ArticlesConnection {
edges: [ArticlesEdge!]!
pageInfo: PageInfo!
}
"""
unique or primary key constraints on table "articles"
"""
enum ArticlesConstraint {
"""
unique or primary key constraint on columns "id"
"""
articles_pkey
}
type ArticlesEdge {
cursor: String!
node: Articles!
}
"""
input type for inserting data into table "articles"
"""
input ArticlesInsertInput {
authorId: uuid
body: String
createdAt: timestamptz
id: uuid
intro: String
updatedAt: timestamptz
}
"""
response of any mutation on the table "articles"
"""
type ArticlesMutationResponse {
"""number of rows affected by the mutation"""
affectedRows: Int!
"""data from the rows affected by the mutation"""
returning: [Articles!]!
}
"""
on_conflict condition type for table "articles"
"""
input ArticlesOnConflict {
constraint: ArticlesConstraint!
updateColumns: [ArticlesUpdateColumn!]! = []
where: ArticlesBoolExp
}
"""Ordering options when selecting data from "articles"."""
input ArticlesOrderBy {
authorId: OrderBy
body: OrderBy
createdAt: OrderBy
id: OrderBy
intro: OrderBy
updatedAt: OrderBy
}
"""primary key columns input for table: articles"""
input ArticlesPkColumnsInput {
id: uuid!
}
"""
select columns of table "articles"
"""
enum ArticlesSelectColumn {
"""column name"""
authorId
"""column name"""
body
"""column name"""
createdAt
"""column name"""
id
"""column name"""
intro
"""column name"""
updatedAt
}
"""
input type for updating data in table "articles"
"""
input ArticlesSetInput {
authorId: uuid
body: String
createdAt: timestamptz
id: uuid
intro: String
updatedAt: timestamptz
}
"""
update columns of table "articles"
"""
enum ArticlesUpdateColumn {
"""column name"""
authorId
"""column name"""
body
"""column name"""
createdAt
"""column name"""
id
"""column name"""
intro
"""column name"""
updatedAt
}
input ArticlesUpdates {
"""sets the columns of the filtered rows to the given values"""
_set: ArticlesSetInput
"""filter the rows which have to be updated"""
where: ArticlesBoolExp!
}
input LoginInput {
email: String!
password: String!
}
type LoginResponse {
error: String
token: String
}
"""mutation root"""
type mutation_root {
"""
delete data from the table: "articles"
"""
deleteArticles(
"""filter the rows which have to be deleted"""
where: ArticlesBoolExp!
): ArticlesMutationResponse
"""
delete single row from the table: "articles"
"""
deleteArticlesByPk(id: uuid!): Articles
"""
delete data from the table: "users"
"""
deleteUsers(
"""filter the rows which have to be deleted"""
where: UsersBoolExp!
): UsersMutationResponse
"""
delete single row from the table: "users"
"""
deleteUsersByPk(id: uuid!): Users
"""
insert data into the table: "articles"
"""
insertArticles(
"""the rows to be inserted"""
objects: [ArticlesInsertInput!]!
"""upsert condition"""
onConflict: ArticlesOnConflict
): ArticlesMutationResponse
"""
insert a single row into the table: "articles"
"""
insertArticlesOne(
"""the row to be inserted"""
object: ArticlesInsertInput!
"""upsert condition"""
onConflict: ArticlesOnConflict
): Articles
"""
insert data into the table: "users"
"""
insertUsers(
"""the rows to be inserted"""
objects: [UsersInsertInput!]!
"""upsert condition"""
onConflict: UsersOnConflict
): UsersMutationResponse
"""
insert a single row into the table: "users"
"""
insertUsersOne(
"""the row to be inserted"""
object: UsersInsertInput!
"""upsert condition"""
onConflict: UsersOnConflict
): Users
login(input: LoginInput!): LoginResponse
#(input: #Input!): #Response!
"""
update data of the table: "articles"
"""
updateArticles(
"""sets the columns of the filtered rows to the given values"""
_set: ArticlesSetInput
"""filter the rows which have to be updated"""
where: ArticlesBoolExp!
): ArticlesMutationResponse
"""
update single row of the table: "articles"
"""
updateArticlesByPk(
"""sets the columns of the filtered rows to the given values"""
_set: ArticlesSetInput
pkColumns: ArticlesPkColumnsInput!
): Articles
"""
update multiples rows of table: "articles"
"""
updateArticlesMany(
"""updates to execute, in order"""
updates: [ArticlesUpdates!]!
): [ArticlesMutationResponse]
"""
update data of the table: "users"
"""
updateUsers(
"""sets the columns of the filtered rows to the given values"""
_set: UsersSetInput
"""filter the rows which have to be updated"""
where: UsersBoolExp!
): UsersMutationResponse
"""
update multiples rows of table: "users"
"""
updateUsersMany(
"""updates to execute, in order"""
updates: [UsersUpdates!]!
): [UsersMutationResponse]
"""
update single row of the table: "users"
"""
update_profile(
"""sets the columns of the filtered rows to the given values"""
_set: UsersSetInput
pkColumns: UsersPkColumnsInput!
): Users
}
"""An object with globally unique ID"""
interface Node {
"""A globally unique identifier"""
id: ID!
}
"""column ordering options"""
enum OrderBy {
"""in ascending order, nulls last"""
ASC
"""in ascending order, nulls first"""
ASC_NULLS_FIRST
"""in ascending order, nulls last"""
ASC_NULLS_LAST
"""in descending order, nulls first"""
DESC
"""in descending order, nulls first"""
DESC_NULLS_FIRST
"""in descending order, nulls last"""
DESC_NULLS_LAST
}
type PageInfo {
endCursor: String!
hasNextPage: Boolean!
hasPreviousPage: Boolean!
startCursor: String!
}
type query_root {
"""
fetch data from the table: "articles"
"""
articlesConnection(
after: String
before: String
"""distinct select on columns"""
distinctOn: [ArticlesSelectColumn!]
first: Int
last: Int
"""sort the rows by one or more columns"""
orderBy: [ArticlesOrderBy!]
"""filter the rows returned"""
where: ArticlesBoolExp
): ArticlesConnection!
node(
"""A globally unique id"""
id: ID!
): Node
"""
fetch data from the table: "users"
"""
usersConnection(
after: String
before: String
"""distinct select on columns"""
distinctOn: [UsersSelectColumn!]
first: Int
last: Int
"""sort the rows by one or more columns"""
orderBy: [UsersOrderBy!]
"""filter the rows returned"""
where: UsersBoolExp
): UsersConnection!
}
input #Input {
bio: String!
email: String!
password: String!
username: String!
}
type #Response {
error: String
token: String
}
"""
Boolean expression to compare columns of type "String". All fields are combined with logical 'AND'.
"""
input StringComparisonExp {
_eq: String
_gt: String
_gte: String
"""does the column match the given case-insensitive pattern"""
_ilike: String
_in: [String!]
"""
does the column match the given POSIX regular expression, case insensitive
"""
_iregex: String
_isNull: Boolean
"""does the column match the given pattern"""
_like: String
_lt: String
_lte: String
_neq: String
"""does the column NOT match the given case-insensitive pattern"""
_nilike: String
_nin: [String!]
"""
does the column NOT match the given POSIX regular expression, case insensitive
"""
_niregex: String
"""does the column NOT match the given pattern"""
_nlike: String
"""
does the column NOT match the given POSIX regular expression, case sensitive
"""
_nregex: String
"""does the column NOT match the given SQL regular expression"""
_nsimilar: String
"""
does the column match the given POSIX regular expression, case sensitive
"""
_regex: String
"""does the column match the given SQL regular expression"""
_similar: String
}
type subscription_root {
"""
fetch data from the table: "articles"
"""
articlesConnection(
after: String
before: String
"""distinct select on columns"""
distinctOn: [ArticlesSelectColumn!]
first: Int
last: Int
"""sort the rows by one or more columns"""
orderBy: [ArticlesOrderBy!]
"""filter the rows returned"""
where: ArticlesBoolExp
): ArticlesConnection!
node(
"""A globally unique id"""
id: ID!
): Node
"""
fetch data from the table: "users"
"""
usersConnection(
after: String
before: String
"""distinct select on columns"""
distinctOn: [UsersSelectColumn!]
first: Int
last: Int
"""sort the rows by one or more columns"""
orderBy: [UsersOrderBy!]
"""filter the rows returned"""
where: UsersBoolExp
): UsersConnection!
}
scalar timestamptz
"""
Boolean expression to compare columns of type "timestamptz". All fields are combined with logical 'AND'.
"""
input TimestamptzComparisonExp {
_eq: timestamptz
_gt: timestamptz
_gte: timestamptz
_in: [timestamptz!]
_isNull: Boolean
_lt: timestamptz
_lte: timestamptz
_neq: timestamptz
_nin: [timestamptz!]
}
"""
columns and relationships of "users"
"""
type Users implements Node {
avatarUrl: String
bio: String!
createdAt: timestamptz!
email: String!
id: ID!
password: String!
updatedAt: timestamptz!
username: String!
}
"""
Boolean expression to filter rows from the table "users". All fields are combined with a logical 'AND'.
"""
input UsersBoolExp {
_and: [UsersBoolExp!]
_not: UsersBoolExp
_or: [UsersBoolExp!]
avatarUrl: StringComparisonExp
bio: StringComparisonExp
createdAt: TimestamptzComparisonExp
email: StringComparisonExp
id: UuidComparisonExp
password: StringComparisonExp
updatedAt: TimestamptzComparisonExp
username: StringComparisonExp
}
"""
A Relay connection object on "users"
"""
type UsersConnection {
edges: [UsersEdge!]!
pageInfo: PageInfo!
}
"""
unique or primary key constraints on table "users"
"""
enum UsersConstraint {
"""
unique or primary key constraint on columns "email"
"""
users_email_key
"""
unique or primary key constraint on columns "id"
"""
users_pkey
"""
unique or primary key constraint on columns "username"
"""
users_username_key
}
type UsersEdge {
cursor: String!
node: Users!
}
"""
input type for inserting data into table "users"
"""
input UsersInsertInput {
avatarUrl: String
bio: String
createdAt: timestamptz
email: String
id: uuid
password: String
updatedAt: timestamptz
username: String
}
"""
response of any mutation on the table "users"
"""
type UsersMutationResponse {
"""number of rows affected by the mutation"""
affectedRows: Int!
"""data from the rows affected by the mutation"""
returning: [Users!]!
}
"""
on_conflict condition type for table "users"
"""
input UsersOnConflict {
constraint: UsersConstraint!
updateColumns: [UsersUpdateColumn!]! = []
where: UsersBoolExp
}
"""Ordering options when selecting data from "users"."""
input UsersOrderBy {
avatarUrl: OrderBy
bio: OrderBy
createdAt: OrderBy
email: OrderBy
id: OrderBy
password: OrderBy
updatedAt: OrderBy
username: OrderBy
}
"""primary key columns input for table: users"""
input UsersPkColumnsInput {
id: uuid!
}
"""
select columns of table "users"
"""
enum UsersSelectColumn {
"""column name"""
avatarUrl
"""column name"""
bio
"""column name"""
createdAt
"""column name"""
email
"""column name"""
id
"""column name"""
password
"""column name"""
updatedAt
"""column name"""
username
}
"""
input type for updating data in table "users"
"""
input UsersSetInput {
avatarUrl: String
bio: String
createdAt: timestamptz
email: String
id: uuid
password: String
updatedAt: timestamptz
username: String
}
"""
update columns of table "users"
"""
enum UsersUpdateColumn {
"""column name"""
avatarUrl
"""column name"""
bio
"""column name"""
createdAt
"""column name"""
email
"""column name"""
id
"""column name"""
password
"""column name"""
updatedAt
"""column name"""
username
}
input UsersUpdates {
"""sets the columns of the filtered rows to the given values"""
_set: UsersSetInput
"""filter the rows which have to be updated"""
where: UsersBoolExp!
}
scalar uuid
"""
Boolean expression to compare columns of type "uuid". All fields are combined with logical 'AND'.
"""
input UuidComparisonExp {
_eq: uuid
_gt: uuid
_gte: uuid
_in: [uuid!]
_isNull: Boolean
_lt: uuid
_lte: uuid
_neq: uuid
_nin: [uuid!]
}