@xyd-js/gql 0.1.0-xyd.8 → 0.1.0-xyd.96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/CHANGELOG.md +819 -0
  2. package/LICENSE +21 -0
  3. package/TODO.md +8 -0
  4. package/__fixtures__/-1.opendocs.docs-nested/input.graphql +66 -0
  5. package/__fixtures__/-1.opendocs.docs-nested/output.json +554 -0
  6. package/__fixtures__/-1.opendocs.flat/input.graphql +19 -0
  7. package/__fixtures__/-1.opendocs.flat/output.json +243 -0
  8. package/__fixtures__/-1.opendocs.scopes/input.graphql +33 -0
  9. package/__fixtures__/-1.opendocs.scopes/output.json +378 -0
  10. package/__fixtures__/-1.opendocs.sidebar/input.graphql +44 -0
  11. package/__fixtures__/-1.opendocs.sort/input.graphql +92 -0
  12. package/__fixtures__/-1.opendocs.sort/output.json +1078 -0
  13. package/__fixtures__/-1.opendocs.sort+group/input.graphql +111 -0
  14. package/__fixtures__/-1.opendocs.sort+group/output.json +1114 -0
  15. package/__fixtures__/-1.opendocs.sort+group+path/input.graphql +118 -0
  16. package/__fixtures__/-1.opendocs.sort+group+path/output.json +1114 -0
  17. package/__fixtures__/-2.complex.github/input.graphql +69424 -0
  18. package/__fixtures__/-2.complex.github/output.json +269874 -0
  19. package/__fixtures__/-2.complex.livesession/input.graphql +23 -0
  20. package/__fixtures__/-2.complex.livesession/output.json +302 -0
  21. package/__fixtures__/-2.complex.monday/input.graphql +6089 -0
  22. package/__fixtures__/-2.complex.monday/output.json +1 -0
  23. package/__fixtures__/-3.array-non-null-return/input.graphql +9 -0
  24. package/__fixtures__/-3.array-non-null-return/output.json +151 -0
  25. package/__fixtures__/1.basic/input.graphql +118 -0
  26. package/__fixtures__/1.basic/output.json +630 -0
  27. package/__fixtures__/2.circular/input.graphql +17 -0
  28. package/__fixtures__/2.circular/output.json +248 -0
  29. package/__fixtures__/3.opendocs/input.graphql +27 -0
  30. package/__fixtures__/3.opendocs/output.json +338 -0
  31. package/__fixtures__/4.union/input.graphql +19 -0
  32. package/__fixtures__/4.union/output.json +344 -0
  33. package/__fixtures__/5.flat/input.graphql +27 -0
  34. package/__fixtures__/5.flat/output.json +383 -0
  35. package/__fixtures__/6.default-values/input.graphql +47 -0
  36. package/__fixtures__/6.default-values/output.json +655 -0
  37. package/__fixtures__/7.type-args/input.graphql +19 -0
  38. package/__fixtures__/7.type-args/output.json +301 -0
  39. package/__fixtures__/8.default-sort/input.graphql +60 -0
  40. package/__fixtures__/8.default-sort/output.json +1078 -0
  41. package/__tests__/gqlSchemaToReferences.test.ts +109 -0
  42. package/__tests__/utils.ts +45 -0
  43. package/declarations.d.ts +4 -0
  44. package/dist/index.d.ts +17 -1
  45. package/dist/index.js +1334 -19871
  46. package/dist/index.js.map +1 -1
  47. package/dist/opendocs.graphql +56 -0
  48. package/package.json +7 -9
  49. package/src/context.ts +17 -0
  50. package/src/converters/gql-arg.ts +51 -0
  51. package/src/converters/gql-enum.ts +27 -0
  52. package/src/converters/gql-field.ts +164 -0
  53. package/src/converters/gql-input.ts +34 -0
  54. package/src/converters/gql-interface.ts +35 -0
  55. package/src/converters/gql-mutation.ts +36 -0
  56. package/src/converters/gql-object.ts +83 -0
  57. package/src/converters/gql-operation.ts +128 -0
  58. package/src/converters/gql-query.ts +36 -0
  59. package/src/converters/gql-sample.ts +159 -0
  60. package/src/converters/gql-scalar.ts +16 -0
  61. package/src/converters/gql-subscription.ts +36 -0
  62. package/src/converters/gql-types.ts +195 -0
  63. package/src/converters/gql-union.ts +40 -0
  64. package/src/gql-core.ts +362 -0
  65. package/src/opendocs.graphql +56 -0
  66. package/src/opendocs.ts +253 -0
  67. package/src/schema.ts +253 -67
  68. package/src/types.ts +103 -0
  69. package/src/utils.ts +21 -96
  70. package/tsconfig.json +1 -1
  71. package/tsup.config.ts +15 -1
  72. package/vitest.config.ts +15 -1
  73. package/examples/basic/index.ts +0 -12
  74. package/examples/basic/schema.graphqls +0 -89
  75. package/examples/basic/todo-app.graphqls +0 -184
  76. package/examples/graphql-types/graphql-types.0.basic.graphqls +0 -28
  77. package/examples/nested/nested-arg.0.not-required.graphqls +0 -8
  78. package/examples/nested/nested-arg.0.required.graphqls +0 -8
  79. package/examples/nested/nested-arg.1.deep.graphqls +0 -12
  80. package/src/hydration/README.md +0 -1
  81. package/src/hydration/gql-arg.ts +0 -53
  82. package/src/hydration/gql-field.ts +0 -206
  83. package/src/hydration/gql-input.ts +0 -67
  84. package/src/hydration/gql-object.ts +0 -35
  85. package/src/hydration/gql-types.ts +0 -50
  86. package/src/samples/index.ts +0 -95
  87. package/test/graphql-types.0.test.ts +0 -125
  88. package/test/nested-arg.0.test.ts +0 -208
  89. package/test/nested-arg.1.test.ts +0 -19
@@ -0,0 +1,1114 @@
1
+ [
2
+ {
3
+ "title": "user",
4
+ "description": "",
5
+ "canonical": "users/queries/user",
6
+ "category": "graphql",
7
+ "type": "graphql_query",
8
+ "context": {
9
+ "graphqlTypeShort": "query",
10
+ "graphqlName": "user",
11
+ "group": [
12
+ "API & Reference",
13
+ "Users",
14
+ "Queries"
15
+ ],
16
+ "scopes": []
17
+ },
18
+ "examples": {
19
+ "groups": [
20
+ {
21
+ "description": "",
22
+ "examples": [
23
+ {
24
+ "codeblock": {
25
+ "tabs": [
26
+ {
27
+ "title": "",
28
+ "language": "graphql",
29
+ "code": "query user($id: ID!) {\n user(id: $id) {\n # user fields\n }\n}"
30
+ }
31
+ ]
32
+ }
33
+ }
34
+ ]
35
+ }
36
+ ]
37
+ },
38
+ "definitions": [
39
+ {
40
+ "title": "Arguments",
41
+ "properties": [
42
+ {
43
+ "name": "id",
44
+ "type": "ID!",
45
+ "description": "",
46
+ "context": {
47
+ "graphqlName": "id",
48
+ "graphqlTypeFlat": "ID",
49
+ "graphqlBuiltInType": true
50
+ },
51
+ "properties": [],
52
+ "meta": [
53
+ {
54
+ "name": "required",
55
+ "value": "true"
56
+ }
57
+ ],
58
+ "symbolDef": {
59
+ "canonical": ""
60
+ }
61
+ }
62
+ ]
63
+ },
64
+ {
65
+ "title": "Returns",
66
+ "properties": [
67
+ {
68
+ "name": "",
69
+ "type": "User",
70
+ "description": "",
71
+ "context": {
72
+ "graphqlName": "user",
73
+ "graphqlTypeFlat": "User",
74
+ "graphqlBuiltInType": false
75
+ },
76
+ "properties": [],
77
+ "meta": [],
78
+ "symbolDef": {
79
+ "canonical": "objects/User"
80
+ }
81
+ }
82
+ ]
83
+ }
84
+ ]
85
+ },
86
+ {
87
+ "title": "users",
88
+ "description": "",
89
+ "canonical": "users/queries/users-list",
90
+ "category": "graphql",
91
+ "type": "graphql_query",
92
+ "context": {
93
+ "graphqlTypeShort": "query",
94
+ "graphqlName": "users",
95
+ "group": [
96
+ "API & Reference",
97
+ "Users",
98
+ "Queries"
99
+ ],
100
+ "scopes": []
101
+ },
102
+ "examples": {
103
+ "groups": [
104
+ {
105
+ "description": "",
106
+ "examples": [
107
+ {
108
+ "codeblock": {
109
+ "tabs": [
110
+ {
111
+ "title": "",
112
+ "language": "graphql",
113
+ "code": "{\n users {\n # users fields\n }\n}"
114
+ }
115
+ ]
116
+ }
117
+ }
118
+ ]
119
+ }
120
+ ]
121
+ },
122
+ "definitions": [
123
+ {
124
+ "title": "Arguments",
125
+ "properties": []
126
+ },
127
+ {
128
+ "title": "Returns",
129
+ "properties": [
130
+ {
131
+ "name": "",
132
+ "type": "[User!]!",
133
+ "description": "",
134
+ "context": {
135
+ "graphqlName": "users",
136
+ "graphqlTypeFlat": "User",
137
+ "graphqlBuiltInType": false
138
+ },
139
+ "properties": [],
140
+ "meta": [
141
+ {
142
+ "name": "required",
143
+ "value": "true"
144
+ }
145
+ ],
146
+ "symbolDef": {
147
+ "canonical": "objects/User"
148
+ }
149
+ }
150
+ ]
151
+ }
152
+ ]
153
+ },
154
+ {
155
+ "title": "createUser",
156
+ "description": "",
157
+ "canonical": "users/mutations/createUser",
158
+ "category": "graphql",
159
+ "type": "graphql_mutation",
160
+ "context": {
161
+ "graphqlTypeShort": "mutation",
162
+ "graphqlName": "createUser",
163
+ "group": [
164
+ "API & Reference",
165
+ "Users",
166
+ "Mutations"
167
+ ],
168
+ "scopes": []
169
+ },
170
+ "examples": {
171
+ "groups": [
172
+ {
173
+ "description": "",
174
+ "examples": [
175
+ {
176
+ "codeblock": {
177
+ "tabs": [
178
+ {
179
+ "title": "",
180
+ "language": "graphql",
181
+ "code": "mutation createUser($input: UserInput!) {\n createUser(input: $input) {\n # createUser fields\n }\n}"
182
+ }
183
+ ]
184
+ }
185
+ }
186
+ ]
187
+ }
188
+ ]
189
+ },
190
+ "definitions": [
191
+ {
192
+ "title": "Arguments",
193
+ "properties": [
194
+ {
195
+ "name": "input",
196
+ "type": "UserInput!",
197
+ "description": "",
198
+ "context": {
199
+ "graphqlTypeShort": "input",
200
+ "graphqlName": "UserInput",
201
+ "group": [
202
+ "API & Reference",
203
+ "Users",
204
+ "Inputs"
205
+ ],
206
+ "scopes": []
207
+ },
208
+ "properties": [],
209
+ "meta": [
210
+ {
211
+ "name": "required",
212
+ "value": "true"
213
+ }
214
+ ],
215
+ "symbolDef": {
216
+ "canonical": "inputs/UserInput"
217
+ }
218
+ }
219
+ ]
220
+ },
221
+ {
222
+ "title": "Returns",
223
+ "properties": [
224
+ {
225
+ "name": "",
226
+ "type": "User!",
227
+ "description": "",
228
+ "context": {
229
+ "graphqlName": "createUser",
230
+ "graphqlTypeFlat": "User",
231
+ "graphqlBuiltInType": false
232
+ },
233
+ "properties": [],
234
+ "meta": [
235
+ {
236
+ "name": "required",
237
+ "value": "true"
238
+ }
239
+ ],
240
+ "symbolDef": {
241
+ "canonical": "objects/User"
242
+ }
243
+ }
244
+ ]
245
+ }
246
+ ]
247
+ },
248
+ {
249
+ "title": "updateUser",
250
+ "description": "",
251
+ "canonical": "users/mutations/updateUser",
252
+ "category": "graphql",
253
+ "type": "graphql_mutation",
254
+ "context": {
255
+ "graphqlTypeShort": "mutation",
256
+ "graphqlName": "updateUser",
257
+ "group": [
258
+ "API & Reference",
259
+ "Users",
260
+ "Mutations"
261
+ ],
262
+ "scopes": []
263
+ },
264
+ "examples": {
265
+ "groups": [
266
+ {
267
+ "description": "",
268
+ "examples": [
269
+ {
270
+ "codeblock": {
271
+ "tabs": [
272
+ {
273
+ "title": "",
274
+ "language": "graphql",
275
+ "code": "mutation updateUser($id: ID!, $input: UserInput!) {\n updateUser(id: $id, input: $input) {\n # updateUser fields\n }\n}"
276
+ }
277
+ ]
278
+ }
279
+ }
280
+ ]
281
+ }
282
+ ]
283
+ },
284
+ "definitions": [
285
+ {
286
+ "title": "Arguments",
287
+ "properties": [
288
+ {
289
+ "name": "id",
290
+ "type": "ID!",
291
+ "description": "",
292
+ "context": {
293
+ "graphqlName": "id",
294
+ "graphqlTypeFlat": "ID",
295
+ "graphqlBuiltInType": true
296
+ },
297
+ "properties": [],
298
+ "meta": [
299
+ {
300
+ "name": "required",
301
+ "value": "true"
302
+ }
303
+ ],
304
+ "symbolDef": {
305
+ "canonical": ""
306
+ }
307
+ },
308
+ {
309
+ "name": "input",
310
+ "type": "UserInput!",
311
+ "description": "",
312
+ "context": {
313
+ "graphqlTypeShort": "input",
314
+ "graphqlName": "UserInput",
315
+ "group": [
316
+ "API & Reference",
317
+ "Users",
318
+ "Inputs"
319
+ ],
320
+ "scopes": []
321
+ },
322
+ "properties": [],
323
+ "meta": [
324
+ {
325
+ "name": "required",
326
+ "value": "true"
327
+ }
328
+ ],
329
+ "symbolDef": {
330
+ "canonical": "inputs/UserInput"
331
+ }
332
+ }
333
+ ]
334
+ },
335
+ {
336
+ "title": "Returns",
337
+ "properties": [
338
+ {
339
+ "name": "",
340
+ "type": "User!",
341
+ "description": "",
342
+ "context": {
343
+ "graphqlName": "updateUser",
344
+ "graphqlTypeFlat": "User",
345
+ "graphqlBuiltInType": false
346
+ },
347
+ "properties": [],
348
+ "meta": [
349
+ {
350
+ "name": "required",
351
+ "value": "true"
352
+ }
353
+ ],
354
+ "symbolDef": {
355
+ "canonical": "objects/User"
356
+ }
357
+ }
358
+ ]
359
+ }
360
+ ]
361
+ },
362
+ {
363
+ "title": "userCreated",
364
+ "description": "",
365
+ "canonical": "users/subscriptions/userCreated",
366
+ "category": "graphql",
367
+ "type": "graphql_subscription",
368
+ "context": {
369
+ "graphqlTypeShort": "subscription",
370
+ "graphqlName": "userCreated",
371
+ "group": [
372
+ "API & Reference",
373
+ "Users",
374
+ "Subscriptions"
375
+ ],
376
+ "scopes": []
377
+ },
378
+ "examples": {
379
+ "groups": [
380
+ {
381
+ "description": "",
382
+ "examples": [
383
+ {
384
+ "codeblock": {
385
+ "tabs": [
386
+ {
387
+ "title": "",
388
+ "language": "graphql",
389
+ "code": "subscription {\n userCreated {\n # userCreated fields\n }\n}"
390
+ }
391
+ ]
392
+ }
393
+ }
394
+ ]
395
+ }
396
+ ]
397
+ },
398
+ "definitions": [
399
+ {
400
+ "title": "Arguments",
401
+ "properties": []
402
+ },
403
+ {
404
+ "title": "Returns",
405
+ "properties": [
406
+ {
407
+ "name": "",
408
+ "type": "User!",
409
+ "description": "",
410
+ "context": {
411
+ "graphqlName": "userCreated",
412
+ "graphqlTypeFlat": "User",
413
+ "graphqlBuiltInType": false
414
+ },
415
+ "properties": [],
416
+ "meta": [
417
+ {
418
+ "name": "required",
419
+ "value": "true"
420
+ }
421
+ ],
422
+ "symbolDef": {
423
+ "canonical": "objects/User"
424
+ }
425
+ }
426
+ ]
427
+ }
428
+ ]
429
+ },
430
+ {
431
+ "title": "userUpdated",
432
+ "description": "",
433
+ "canonical": "users/subscriptions/userUpdated",
434
+ "category": "graphql",
435
+ "type": "graphql_subscription",
436
+ "context": {
437
+ "graphqlTypeShort": "subscription",
438
+ "graphqlName": "userUpdated",
439
+ "group": [
440
+ "API & Reference",
441
+ "Users",
442
+ "Subscriptions"
443
+ ],
444
+ "scopes": []
445
+ },
446
+ "examples": {
447
+ "groups": [
448
+ {
449
+ "description": "",
450
+ "examples": [
451
+ {
452
+ "codeblock": {
453
+ "tabs": [
454
+ {
455
+ "title": "",
456
+ "language": "graphql",
457
+ "code": "subscription {\n userUpdated {\n # userUpdated fields\n }\n}"
458
+ }
459
+ ]
460
+ }
461
+ }
462
+ ]
463
+ }
464
+ ]
465
+ },
466
+ "definitions": [
467
+ {
468
+ "title": "Arguments",
469
+ "properties": []
470
+ },
471
+ {
472
+ "title": "Returns",
473
+ "properties": [
474
+ {
475
+ "name": "",
476
+ "type": "User!",
477
+ "description": "",
478
+ "context": {
479
+ "graphqlName": "userUpdated",
480
+ "graphqlTypeFlat": "User",
481
+ "graphqlBuiltInType": false
482
+ },
483
+ "properties": [],
484
+ "meta": [
485
+ {
486
+ "name": "required",
487
+ "value": "true"
488
+ }
489
+ ],
490
+ "symbolDef": {
491
+ "canonical": "objects/User"
492
+ }
493
+ }
494
+ ]
495
+ }
496
+ ]
497
+ },
498
+ {
499
+ "title": "UserInput",
500
+ "description": "",
501
+ "canonical": "inputs/UserInput",
502
+ "category": "graphql",
503
+ "type": "graphql_input",
504
+ "context": {
505
+ "graphqlTypeShort": "input",
506
+ "graphqlName": "UserInput",
507
+ "group": [
508
+ "API & Reference",
509
+ "Users",
510
+ "Inputs"
511
+ ],
512
+ "scopes": []
513
+ },
514
+ "examples": {
515
+ "groups": []
516
+ },
517
+ "definitions": [
518
+ {
519
+ "title": "Fields",
520
+ "properties": [
521
+ {
522
+ "name": "name",
523
+ "type": "String!",
524
+ "description": "",
525
+ "context": {
526
+ "graphqlName": "name",
527
+ "graphqlTypeFlat": "String",
528
+ "graphqlBuiltInType": true
529
+ },
530
+ "properties": [],
531
+ "meta": [
532
+ {
533
+ "name": "required",
534
+ "value": "true"
535
+ }
536
+ ],
537
+ "symbolDef": {
538
+ "canonical": ""
539
+ }
540
+ },
541
+ {
542
+ "name": "email",
543
+ "type": "String!",
544
+ "description": "",
545
+ "context": {
546
+ "graphqlName": "email",
547
+ "graphqlTypeFlat": "String",
548
+ "graphqlBuiltInType": true
549
+ },
550
+ "properties": [],
551
+ "meta": [
552
+ {
553
+ "name": "required",
554
+ "value": "true"
555
+ }
556
+ ],
557
+ "symbolDef": {
558
+ "canonical": ""
559
+ }
560
+ },
561
+ {
562
+ "name": "role",
563
+ "type": "UserRole",
564
+ "description": "",
565
+ "context": {
566
+ "graphqlName": "role",
567
+ "graphqlTypeFlat": "UserRole",
568
+ "graphqlBuiltInType": false
569
+ },
570
+ "properties": [],
571
+ "meta": [],
572
+ "symbolDef": {
573
+ "canonical": "enums/UserRole"
574
+ }
575
+ }
576
+ ]
577
+ }
578
+ ]
579
+ },
580
+ {
581
+ "title": "User",
582
+ "description": "",
583
+ "canonical": "objects/User",
584
+ "category": "graphql",
585
+ "type": "graphql_object",
586
+ "context": {
587
+ "graphqlTypeShort": "object",
588
+ "graphqlName": "User",
589
+ "group": [
590
+ "API & Reference",
591
+ "Users",
592
+ "Objects"
593
+ ],
594
+ "scopes": []
595
+ },
596
+ "examples": {
597
+ "groups": []
598
+ },
599
+ "definitions": [
600
+ {
601
+ "title": "Arguments",
602
+ "properties": [],
603
+ "variants": [],
604
+ "meta": [
605
+ {
606
+ "name": "type",
607
+ "value": "arguments"
608
+ }
609
+ ]
610
+ },
611
+ {
612
+ "title": "Fields",
613
+ "properties": [
614
+ {
615
+ "name": "id",
616
+ "type": "ID!",
617
+ "description": "",
618
+ "context": {
619
+ "graphqlName": "id",
620
+ "graphqlTypeFlat": "ID",
621
+ "graphqlBuiltInType": true
622
+ },
623
+ "properties": [],
624
+ "meta": [
625
+ {
626
+ "name": "required",
627
+ "value": "true"
628
+ }
629
+ ],
630
+ "symbolDef": {
631
+ "canonical": ""
632
+ }
633
+ },
634
+ {
635
+ "name": "name",
636
+ "type": "String!",
637
+ "description": "",
638
+ "context": {
639
+ "graphqlName": "name",
640
+ "graphqlTypeFlat": "String",
641
+ "graphqlBuiltInType": true
642
+ },
643
+ "properties": [],
644
+ "meta": [
645
+ {
646
+ "name": "required",
647
+ "value": "true"
648
+ }
649
+ ],
650
+ "symbolDef": {
651
+ "canonical": ""
652
+ }
653
+ },
654
+ {
655
+ "name": "email",
656
+ "type": "String!",
657
+ "description": "",
658
+ "context": {
659
+ "graphqlName": "email",
660
+ "graphqlTypeFlat": "String",
661
+ "graphqlBuiltInType": true
662
+ },
663
+ "properties": [],
664
+ "meta": [
665
+ {
666
+ "name": "required",
667
+ "value": "true"
668
+ }
669
+ ],
670
+ "symbolDef": {
671
+ "canonical": ""
672
+ }
673
+ },
674
+ {
675
+ "name": "role",
676
+ "type": "UserRole!",
677
+ "description": "",
678
+ "context": {
679
+ "graphqlName": "role",
680
+ "graphqlTypeFlat": "UserRole",
681
+ "graphqlBuiltInType": false
682
+ },
683
+ "properties": [],
684
+ "meta": [
685
+ {
686
+ "name": "required",
687
+ "value": "true"
688
+ }
689
+ ],
690
+ "symbolDef": {
691
+ "canonical": "enums/UserRole"
692
+ }
693
+ },
694
+ {
695
+ "name": "createdAt",
696
+ "type": "DateTime!",
697
+ "description": "",
698
+ "context": {
699
+ "graphqlName": "createdAt",
700
+ "graphqlTypeFlat": "DateTime",
701
+ "graphqlBuiltInType": false
702
+ },
703
+ "properties": [],
704
+ "meta": [
705
+ {
706
+ "name": "required",
707
+ "value": "true"
708
+ }
709
+ ],
710
+ "symbolDef": {
711
+ "canonical": "scalars/DateTime"
712
+ }
713
+ }
714
+ ],
715
+ "meta": [
716
+ {
717
+ "name": "type",
718
+ "value": "fields"
719
+ }
720
+ ]
721
+ }
722
+ ]
723
+ },
724
+ {
725
+ "title": "UserRole",
726
+ "description": "",
727
+ "canonical": "enums/UserRole",
728
+ "category": "graphql",
729
+ "type": "graphql_enum",
730
+ "context": {
731
+ "graphqlTypeShort": "enum",
732
+ "graphqlName": "UserRole",
733
+ "group": [
734
+ "API & Reference",
735
+ "Users",
736
+ "Enums"
737
+ ],
738
+ "scopes": []
739
+ },
740
+ "examples": {
741
+ "groups": []
742
+ },
743
+ "definitions": [
744
+ {
745
+ "title": "Valid values",
746
+ "properties": [
747
+ {
748
+ "name": "ADMIN",
749
+ "type": "string",
750
+ "description": ""
751
+ },
752
+ {
753
+ "name": "USER",
754
+ "type": "string",
755
+ "description": ""
756
+ },
757
+ {
758
+ "name": "GUEST",
759
+ "type": "string",
760
+ "description": ""
761
+ }
762
+ ]
763
+ }
764
+ ]
765
+ },
766
+ {
767
+ "title": "search",
768
+ "description": "",
769
+ "canonical": "search/queries/search",
770
+ "category": "graphql",
771
+ "type": "graphql_query",
772
+ "context": {
773
+ "graphqlTypeShort": "query",
774
+ "graphqlName": "search",
775
+ "group": [
776
+ "API & Reference",
777
+ "Search",
778
+ "Queries"
779
+ ],
780
+ "scopes": []
781
+ },
782
+ "examples": {
783
+ "groups": [
784
+ {
785
+ "description": "",
786
+ "examples": [
787
+ {
788
+ "codeblock": {
789
+ "tabs": [
790
+ {
791
+ "title": "",
792
+ "language": "graphql",
793
+ "code": "{\n search(query: \"example-query\") {\n # search fields\n }\n}"
794
+ }
795
+ ]
796
+ }
797
+ }
798
+ ]
799
+ }
800
+ ]
801
+ },
802
+ "definitions": [
803
+ {
804
+ "title": "Arguments",
805
+ "properties": [
806
+ {
807
+ "name": "query",
808
+ "type": "String!",
809
+ "description": "",
810
+ "context": {
811
+ "graphqlName": "query",
812
+ "graphqlTypeFlat": "String",
813
+ "graphqlBuiltInType": true
814
+ },
815
+ "properties": [],
816
+ "meta": [
817
+ {
818
+ "name": "required",
819
+ "value": "true"
820
+ }
821
+ ],
822
+ "symbolDef": {
823
+ "canonical": ""
824
+ }
825
+ }
826
+ ]
827
+ },
828
+ {
829
+ "title": "Returns",
830
+ "properties": [
831
+ {
832
+ "name": "",
833
+ "type": "[SearchResult!]!",
834
+ "description": "",
835
+ "context": {
836
+ "graphqlName": "search",
837
+ "graphqlTypeFlat": "SearchResult",
838
+ "graphqlBuiltInType": false
839
+ },
840
+ "properties": [],
841
+ "meta": [
842
+ {
843
+ "name": "required",
844
+ "value": "true"
845
+ }
846
+ ],
847
+ "symbolDef": {
848
+ "canonical": "unions/SearchResult"
849
+ }
850
+ }
851
+ ]
852
+ }
853
+ ]
854
+ },
855
+ {
856
+ "title": "Post",
857
+ "description": "",
858
+ "canonical": "objects/Post",
859
+ "category": "graphql",
860
+ "type": "graphql_object",
861
+ "context": {
862
+ "graphqlTypeShort": "object",
863
+ "graphqlName": "Post",
864
+ "group": [
865
+ "API & Reference",
866
+ "Search",
867
+ "Objects"
868
+ ],
869
+ "scopes": []
870
+ },
871
+ "examples": {
872
+ "groups": []
873
+ },
874
+ "definitions": [
875
+ {
876
+ "title": "Arguments",
877
+ "properties": [],
878
+ "variants": [],
879
+ "meta": [
880
+ {
881
+ "name": "type",
882
+ "value": "arguments"
883
+ }
884
+ ]
885
+ },
886
+ {
887
+ "title": "Fields",
888
+ "properties": [
889
+ {
890
+ "name": "id",
891
+ "type": "ID!",
892
+ "description": "",
893
+ "context": {
894
+ "graphqlName": "id",
895
+ "graphqlTypeFlat": "ID",
896
+ "graphqlBuiltInType": true
897
+ },
898
+ "properties": [],
899
+ "meta": [
900
+ {
901
+ "name": "required",
902
+ "value": "true"
903
+ }
904
+ ],
905
+ "symbolDef": {
906
+ "canonical": ""
907
+ }
908
+ },
909
+ {
910
+ "name": "title",
911
+ "type": "String!",
912
+ "description": "",
913
+ "context": {
914
+ "graphqlName": "title",
915
+ "graphqlTypeFlat": "String",
916
+ "graphqlBuiltInType": true
917
+ },
918
+ "properties": [],
919
+ "meta": [
920
+ {
921
+ "name": "required",
922
+ "value": "true"
923
+ }
924
+ ],
925
+ "symbolDef": {
926
+ "canonical": ""
927
+ }
928
+ },
929
+ {
930
+ "name": "content",
931
+ "type": "String!",
932
+ "description": "",
933
+ "context": {
934
+ "graphqlName": "content",
935
+ "graphqlTypeFlat": "String",
936
+ "graphqlBuiltInType": true
937
+ },
938
+ "properties": [],
939
+ "meta": [
940
+ {
941
+ "name": "required",
942
+ "value": "true"
943
+ }
944
+ ],
945
+ "symbolDef": {
946
+ "canonical": ""
947
+ }
948
+ },
949
+ {
950
+ "name": "author",
951
+ "type": "User!",
952
+ "description": "",
953
+ "context": {
954
+ "graphqlName": "author",
955
+ "graphqlTypeFlat": "User",
956
+ "graphqlBuiltInType": false
957
+ },
958
+ "properties": [],
959
+ "meta": [
960
+ {
961
+ "name": "required",
962
+ "value": "true"
963
+ }
964
+ ],
965
+ "symbolDef": {
966
+ "canonical": "objects/User"
967
+ }
968
+ }
969
+ ],
970
+ "meta": [
971
+ {
972
+ "name": "type",
973
+ "value": "fields"
974
+ }
975
+ ]
976
+ }
977
+ ]
978
+ },
979
+ {
980
+ "title": "SearchResult",
981
+ "description": "",
982
+ "canonical": "unions/SearchResult",
983
+ "category": "graphql",
984
+ "type": "graphql_union",
985
+ "context": {
986
+ "graphqlTypeShort": "union",
987
+ "graphqlName": "SearchResult",
988
+ "group": [
989
+ "API & Reference",
990
+ "Search",
991
+ "Unions"
992
+ ],
993
+ "scopes": []
994
+ },
995
+ "examples": {
996
+ "groups": []
997
+ },
998
+ "definitions": [
999
+ {
1000
+ "title": "Possible types",
1001
+ "properties": [
1002
+ {
1003
+ "name": "User",
1004
+ "type": "User",
1005
+ "description": "",
1006
+ "context": {
1007
+ "graphqlTypeShort": "object",
1008
+ "graphqlName": "User",
1009
+ "group": [
1010
+ "API & Reference",
1011
+ "Users",
1012
+ "Objects"
1013
+ ],
1014
+ "scopes": []
1015
+ },
1016
+ "properties": [],
1017
+ "meta": [],
1018
+ "symbolDef": {
1019
+ "canonical": "objects/User"
1020
+ }
1021
+ },
1022
+ {
1023
+ "name": "Post",
1024
+ "type": "Post",
1025
+ "description": "",
1026
+ "context": {
1027
+ "graphqlTypeShort": "object",
1028
+ "graphqlName": "Post",
1029
+ "group": [
1030
+ "API & Reference",
1031
+ "Search",
1032
+ "Objects"
1033
+ ],
1034
+ "scopes": []
1035
+ },
1036
+ "properties": [],
1037
+ "meta": [],
1038
+ "symbolDef": {
1039
+ "canonical": "objects/Post"
1040
+ }
1041
+ }
1042
+ ]
1043
+ }
1044
+ ]
1045
+ },
1046
+ {
1047
+ "title": "Node",
1048
+ "description": "",
1049
+ "canonical": "interfaces/Node",
1050
+ "category": "graphql",
1051
+ "type": "graphql_interface",
1052
+ "context": {
1053
+ "graphqlTypeShort": "interface",
1054
+ "graphqlName": "Node",
1055
+ "group": [
1056
+ "API & Reference",
1057
+ "GraphQL Types",
1058
+ "Interfaces"
1059
+ ],
1060
+ "scopes": []
1061
+ },
1062
+ "examples": {
1063
+ "groups": []
1064
+ },
1065
+ "definitions": [
1066
+ {
1067
+ "title": "Fields",
1068
+ "properties": [
1069
+ {
1070
+ "name": "id",
1071
+ "type": "ID!",
1072
+ "description": "",
1073
+ "context": {
1074
+ "graphqlName": "id",
1075
+ "graphqlTypeFlat": "ID",
1076
+ "graphqlBuiltInType": true
1077
+ },
1078
+ "properties": [],
1079
+ "meta": [
1080
+ {
1081
+ "name": "required",
1082
+ "value": "true"
1083
+ }
1084
+ ],
1085
+ "symbolDef": {
1086
+ "canonical": ""
1087
+ }
1088
+ }
1089
+ ]
1090
+ }
1091
+ ]
1092
+ },
1093
+ {
1094
+ "title": "DateTime",
1095
+ "description": "",
1096
+ "canonical": "scalars/DateTime",
1097
+ "category": "graphql",
1098
+ "type": "graphql_scalar",
1099
+ "context": {
1100
+ "graphqlTypeShort": "scalar",
1101
+ "graphqlName": "DateTime",
1102
+ "group": [
1103
+ "API & Reference",
1104
+ "GraphQL Types",
1105
+ "Scalars"
1106
+ ],
1107
+ "scopes": []
1108
+ },
1109
+ "examples": {
1110
+ "groups": []
1111
+ },
1112
+ "definitions": []
1113
+ }
1114
+ ]