-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Expand file tree
/
Copy pathrelay-compiler-config-schema.json
More file actions
1682 lines (1682 loc) · 59.8 KB
/
Copy pathrelay-compiler-config-schema.json
File metadata and controls
1682 lines (1682 loc) · 59.8 KB
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
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "ConfigFile",
"description": "Relay's configuration file. Supports a single project config for simple use\ncases and a multi-project config for cases where multiple projects live in\nthe same repository.\n\nIn general, start with the SingleProjectConfigFile.",
"anyOf": [
{
"description": "Base case configuration (mostly of OSS) where the project\nhave single schema, and single source directory",
"$ref": "#/$defs/SingleProjectConfigFile"
},
{
"description": "Relay can support multiple projects with multiple schemas\nand different options (output, typegen, etc...).\nThis MultiProjectConfigFile is responsible for configuring\nthese type of projects (complex)",
"$ref": "#/$defs/MultiProjectConfigFile"
}
],
"$defs": {
"ArgumentName": {
"$ref": "#/$defs/StringKey"
},
"ConfigFileProject": {
"type": "object",
"properties": {
"base": {
"description": "If a base project is set, the documents of that project can be\nreferenced, but won't produce output artifacts.\nExtensions from the base project will be added as well and the schema\nof the base project should be a subset of the schema of this project.",
"anyOf": [
{
"$ref": "#/$defs/ProjectName"
},
{
"type": "null"
}
],
"default": null
},
"codegenCommand": {
"description": "Name of the command that runs the relay compiler. This will be added at\nthe top of generated code to let readers know how to regenerate the file.",
"type": [
"string",
"null"
],
"default": null
},
"customErrorType": {
"description": "A map from GraphQL error name to import path, example:\n{\"name:: \"MyErrorName\", \"path\": \"../src/MyError\"}",
"anyOf": [
{
"$ref": "#/$defs/CustomTypeImport"
},
{
"type": "null"
}
]
},
"customScalarTypes": {
"description": "A map from GraphQL scalar types to a custom JS type, example:\n{ \"Url\": \"String\" }\n{ \"Url\": {\"name:: \"MyURL\", \"path\": \"../src/MyUrlTypes\"} }",
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/CustomType"
},
"default": {}
},
"diagnosticReportConfig": {
"description": "Threshold for diagnostics to be critical to the compiler's execution.\nAll diagnostic with severities at and below this level will cause the\ncompiler to fatally exit.",
"$ref": "#/$defs/DiagnosticReportConfig",
"default": {
"criticalLevel": "error"
}
},
"eagerEsModules": {
"description": "This option enables opting out of emitting es modules artifacts. When\nset to false, Relay will emit CommonJS modules.",
"type": "boolean",
"default": true
},
"enumModuleSuffix": {
"title": "For Flow type generation",
"description": "When set, enum values are imported from a module with this suffix.\nFor example, an enum Foo and this property set to \".test\" would be\nimported from \"Foo.test\".\nNote: an empty string is allowed and different from not setting the\nvalue, in the example above it would just import from \"Foo\".",
"type": [
"string",
"null"
]
},
"excludesExtensions": {
"description": "Some projects may need to exclude files with certain extensions.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"extra": {
"description": "A placeholder for allowing extra information in the config file",
"default": null
},
"extraArtifactsOutput": {
"description": "Some projects may need to generate extra artifacts. For those, we may\nneed to provide an additional directory to put them.\nBy default the will use `output` *if available",
"type": [
"string",
"null"
]
},
"featureFlags": {
"description": "Enable and disable experimental or legacy behaviors.\nWARNING! These are not stable and may change at any time.",
"anyOf": [
{
"$ref": "#/$defs/FeatureFlags"
},
{
"type": "null"
}
],
"default": null
},
"jsModuleFormat": {
"description": "Import/export style to use in generated JavaScript modules.",
"$ref": "#/$defs/JsModuleFormat",
"default": "commonjs"
},
"language": {
"description": "The desired output language, \"flow\" or \"typescript\".",
"$ref": "#/$defs/TypegenLanguage"
},
"moduleImportConfig": {
"description": "Configuration for the @module GraphQL directive.",
"$ref": "#/$defs/ModuleImportConfig",
"default": {
"dynamicModuleProvider": null,
"operationModuleProvider": null,
"surface": null
}
},
"noFutureProofEnums": {
"description": "This option controls whether or not a catch-all entry is added to enum type definitions\nfor values that may be added in the future. Enabling this means you will have to update\nyour application whenever the GraphQL server schema adds new enum values to prevent it\nfrom breaking.",
"type": "boolean",
"default": false
},
"oneOfType": {
"description": "How to generate a type for an input object marked as @oneOf.\nDefaults to \"strict\", which is to generate a union type which\npermits only a single property being set at a time. \"ignore\"\ngenerates the type as if the @oneOf annotation does not exist.",
"$ref": "#/$defs/OneOfGeneration",
"default": "strict"
},
"optionalInputFields": {
"title": "For Flow type generation",
"description": "When set, generated input types will have the listed fields optional\neven if the schema defines them as required.",
"type": "array",
"default": [],
"items": {
"$ref": "#/$defs/StringKey"
}
},
"output": {
"description": "A project without an output directory will put the generated files in\na __generated__ directory next to the input file.\nAll files in these directories should be generated by the Relay\ncompiler, so that the compiler can cleanup extra files.",
"type": [
"string",
"null"
],
"default": null
},
"persist": {
"description": "If this option is set, the compiler will persist queries using this\nconfig.",
"anyOf": [
{
"$ref": "#/$defs/PersistConfig"
},
{
"type": "null"
}
]
},
"relativizeJsModulePaths": {
"description": "Whether to treat all JS module names as relative to './' (true) or not.\ndefault: true",
"type": "boolean",
"default": true
},
"requireCustomScalarTypes": {
"description": "Require all GraphQL scalar types mapping to be defined, will throw\nif a GraphQL scalar type doesn't have a JS type",
"type": "boolean",
"default": false
},
"resolverContextType": {
"description": "Indicates the type to import and use as the context for Relay Resolvers.",
"anyOf": [
{
"$ref": "#/$defs/ResolverContextTypeInput"
},
{
"type": "null"
}
],
"default": null
},
"resolversSchemaModule": {
"anyOf": [
{
"$ref": "#/$defs/ResolversSchemaModuleConfig"
},
{
"type": "null"
}
],
"default": null
},
"rollout": {
"description": "A generic rollout state for larger codegen changes. The default is to\npass, otherwise it should be a number between 0 and 100 as a percentage.",
"$ref": "#/$defs/Rollout",
"default": null
},
"schema": {
"description": "Path to the schema.graphql or a directory containing a schema broken up\nin multiple *.graphql files.\nExactly 1 of these options needs to be defined.",
"type": [
"string",
"null"
]
},
"schemaCompact": {
"type": [
"string",
"null"
]
},
"schemaConfig": {
"description": "Extra configuration for the GraphQL schema itself.",
"$ref": "#/$defs/SchemaConfig",
"default": {
"connectionInterface": {
"cursor": "cursor",
"edges": "edges",
"endCursor": "endCursor",
"hasNextPage": "hasNextPage",
"hasPreviousPage": "hasPreviousPage",
"node": "node",
"pageInfo": "pageInfo",
"startCursor": "startCursor"
},
"deferStreamInterface": {
"deferName": "defer",
"ifArg": "if",
"initialCountArg": "initialCount",
"labelArg": "label",
"streamName": "stream",
"useCustomizedBatchArg": "useCustomizedBatch"
},
"enableTokenField": false,
"nodeInterfaceIdField": "id",
"nodeInterfaceIdVariableName": "id",
"nonNodeIdFields": null,
"unselectableDirectiveName": "unselectable"
}
},
"schemaDir": {
"type": [
"string",
"null"
]
},
"schemaExtensions": {
"description": "File or directory containing *.graphql files with schema extensions.",
"type": "array",
"default": [],
"items": {
"type": "string"
}
},
"schemaName": {
"description": "Schema name, if differs from project name.\nIf schema name is unset, the project name will be used as schema name.",
"anyOf": [
{
"$ref": "#/$defs/StringKey"
},
{
"type": "null"
}
],
"default": null
},
"shardOutput": {
"description": "If `output` is provided and `shard_output` is `true`, shard the files\nby putting them under `{output_dir}/{source_relative_path}`",
"type": "boolean",
"default": false
},
"shardStripRegex": {
"description": "Regex to match and strip parts of the `source_relative_path`",
"type": [
"string",
"null"
],
"default": null
},
"testPathRegex": {
"description": "Optional regex to restrict @relay_test_operation to directories matching\nthis regex. Defaults to no limitations.",
"type": [
"string",
"null"
],
"default": null
},
"typescriptExcludeUndefinedFromNullableUnion": {
"description": "Keep the previous compiler behavior by outputting an union\nof the raw type and null, and not the **correct** behavior\nof an union with the raw type, null and undefined.",
"type": "boolean",
"default": false
},
"useImportTypeSyntax": {
"title": "For Typescript type generation",
"description": "Whether to use the `import type` syntax introduced in Typescript\nversion 3.8. This will prevent warnings from `importsNotUsedAsValues`.",
"type": "boolean",
"default": false
},
"variableNamesComment": {
"description": "Generates a `// @relayVariables name1 name2` header in generated operation files",
"type": "boolean",
"default": false
}
},
"additionalProperties": false,
"required": [
"language"
]
},
"ConnectionInterface": {
"description": "Configuration where Relay should expect some fields in the schema.\n\n**Important**: When you configure this option in the compiler, you must also configure\nthe Relay runtime to match by calling `ConnectionInterface.inject()` with the same values.\nSee: <https://relay.dev/docs/api-reference/runtime-config/#connectioninterface>",
"type": "object",
"properties": {
"cursor": {
"$ref": "#/$defs/StringKey"
},
"edges": {
"$ref": "#/$defs/StringKey"
},
"endCursor": {
"$ref": "#/$defs/StringKey"
},
"hasNextPage": {
"$ref": "#/$defs/StringKey"
},
"hasPreviousPage": {
"$ref": "#/$defs/StringKey"
},
"node": {
"$ref": "#/$defs/StringKey"
},
"pageInfo": {
"$ref": "#/$defs/StringKey"
},
"startCursor": {
"$ref": "#/$defs/StringKey"
}
},
"additionalProperties": false,
"required": [
"cursor",
"edges",
"endCursor",
"hasNextPage",
"hasPreviousPage",
"node",
"pageInfo",
"startCursor"
]
},
"CustomType": {
"description": "Defines a custom GraphQL\ndescrbing a custom scalar.",
"anyOf": [
{
"description": "A string representing the name of a custom type. e.g. \"string\" or \"number\"",
"$ref": "#/$defs/StringKey"
},
{
"description": "A module which defines the custom type. e.g. { \"name\": \"MyCustomType\", \"path\": \"./Types.ts\" }",
"$ref": "#/$defs/CustomTypeImport"
}
]
},
"CustomTypeImport": {
"description": "Defines a module path and export name of the Flow or TypeScript type\ndescrbing a GraphQL custom scalar.",
"type": "object",
"properties": {
"name": {
"description": "The name under which the type is exported from the module",
"$ref": "#/$defs/StringKey"
},
"path": {
"description": "The path to the module relative to the project root",
"type": "string"
}
},
"required": [
"name",
"path"
]
},
"DeferStreamInterface": {
"description": "Configuration where Relay should expect some fields in the schema.",
"type": "object",
"properties": {
"deferName": {
"$ref": "#/$defs/DirectiveName"
},
"ifArg": {
"$ref": "#/$defs/ArgumentName"
},
"initialCountArg": {
"$ref": "#/$defs/ArgumentName"
},
"labelArg": {
"$ref": "#/$defs/ArgumentName"
},
"streamName": {
"$ref": "#/$defs/DirectiveName"
},
"useCustomizedBatchArg": {
"$ref": "#/$defs/ArgumentName"
}
},
"additionalProperties": false,
"required": [
"deferName",
"streamName",
"ifArg",
"labelArg",
"initialCountArg",
"useCustomizedBatchArg"
]
},
"DeserializableProjectSet": {
"anyOf": [
{
"$ref": "#/$defs/ProjectName"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/ProjectName"
}
}
]
},
"DiagnosticLevel": {
"description": "Levels for reporting errors in the compiler.",
"oneOf": [
{
"description": "Report only errors",
"type": "string",
"const": "error"
},
{
"description": "Report diagnostics up to warnings",
"type": "string",
"const": "warning"
},
{
"description": "Report diagnostics up to informational diagnostics",
"type": "string",
"const": "info"
},
{
"description": "Report diagnostics up to hints",
"type": "string",
"const": "hint"
}
]
},
"DiagnosticReportConfig": {
"description": "Configuration for all diagnostic reporting in the compiler",
"type": "object",
"properties": {
"criticalLevel": {
"description": "Threshold for diagnostics to be critical to the compiler's execution.\nAll diagnostic with severities at and below this level will cause the\ncompiler to fatally exit.",
"$ref": "#/$defs/DiagnosticLevel"
}
},
"required": [
"criticalLevel"
]
},
"DirectiveName": {
"description": "Wrapper struct for clarity rather than having StringKey everywhere.",
"$ref": "#/$defs/StringKey"
},
"FeatureFlag": {
"oneOf": [
{
"description": "Fully disabled: developers may not use this feature",
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "disabled"
}
},
"required": [
"kind"
]
},
{
"description": "Fully enabled: developers may use this feature",
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "enabled"
}
},
"required": [
"kind"
]
},
{
"description": "Partially enabled: developers may only use this feature on the listed items (fragments, fields, types).",
"type": "object",
"properties": {
"allowlist": {
"type": "array",
"items": {
"$ref": "#/$defs/StringKey"
},
"uniqueItems": true
},
"kind": {
"type": "string",
"const": "limited"
}
},
"required": [
"kind",
"allowlist"
]
},
{
"description": "Partially enabled: used for gradual rollout of the feature",
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "rollout"
},
"rollout": {
"$ref": "#/$defs/Rollout"
}
},
"required": [
"kind",
"rollout"
]
},
{
"description": "Partially enabled: used for gradual rollout of the feature",
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "rolloutrange"
},
"rollout": {
"$ref": "#/$defs/RolloutRange"
}
},
"required": [
"kind",
"rollout"
]
}
]
},
"FeatureFlags": {
"type": "object",
"properties": {
"allow_legacy_relay_resolver_tag": {
"description": "When enabled for a given name, allows `@RelayResolver` as a legacy\nalias for `@relayType` / `@relayField`.",
"$ref": "#/$defs/FeatureFlag",
"default": {
"kind": "disabled"
}
},
"allow_output_type_resolvers": {
"description": "@outputType resolvers are a discontinued experimental feature. This flag\nallows users to allowlist old uses of this feature while they work to\nremove them. Weak types (types without an `id` field) returned by a Relay\nResolver should be limited to types defined using `@RelayResolver` with `@weak`.\n\nIf using the \"limited\" feature flag variant, users can allowlist a\nspecific list of field names.\n\nhttps://relay.dev/docs/next/guides/relay-resolvers/defining-types/#defining-a-weak-type",
"$ref": "#/$defs/FeatureFlag",
"default": {
"kind": "disabled"
}
},
"allow_required_in_mutation_response": {
"description": "@required with an action of THROW is read-time feature that is not\ncompatible with our mutation APIs. We are in the process of removing\nany existing examples, but this flag is part of a process of removing\nany existing examples.",
"$ref": "#/$defs/FeatureFlag",
"default": {
"kind": "disabled"
}
},
"allow_resolver_non_nullable_return_type": {
"description": "Allow non-nullable return types from resolvers.",
"$ref": "#/$defs/FeatureFlag",
"default": {
"kind": "disabled"
}
},
"allow_resolvers_in_mutation_response": {
"description": "Relay Resolvers are a read-time feature that are not actually handled in\nour mutation APIs. We are in the process of removing any existing\nexamples, but this flag is part of a process of removing any existing\nexamples.",
"$ref": "#/$defs/FeatureFlag",
"default": {
"kind": "disabled"
}
},
"compact_query_text": {
"description": "Print queries in compact form",
"$ref": "#/$defs/FeatureFlag",
"default": {
"kind": "disabled"
}
},
"disable_deduping_common_structures_in_artifacts": {
"description": "Skip the optimization which extracts common JavaScript structures in\ngenerated artifacts into numbered variables and uses them by reference\nin each position in which they occur.\n\nThis optimization can make it hard to follow changes to generated\ncode, so being able to disable it can be helpful for debugging.\n\nTo disable deduping for just one fragment or operation's generated\nartifacts:\n\n```json\n\"disable_deduping_common_structures_in_artifacts\": {\n { \"kind\": \"limited\", \"allowList\": [\"<operation_or_fragment_name>\"] }\n}\n```",
"$ref": "#/$defs/FeatureFlag",
"default": {
"kind": "disabled"
}
},
"disable_edge_type_name_validation_on_declerative_connection_directives": {
"description": "Disable validation of the `edgeTypeName` argument on `@prependNode` and `@appendNode`.",
"$ref": "#/$defs/FeatureFlag",
"default": {
"kind": "disabled"
}
},
"disable_full_argument_type_validation": {
"description": "Disable full GraphQL argument type validation. Historically, we only applied argument type\nvalidation to the query that was actually going to be persisted and sent\nto the server. This meant that we didn't typecheck arguments passed to\nRelay Resolvers or Client Schema Extensions.\n\nWe also permitted an escape hatch of `uncheckedArguments_DEPRECATED` for\ndefining fragment arguments which were not typechecked.\n\nWe no-longer support `uncheckedArguments_DEPRECATED`, and we typecheck\nboth client and server arguments. This flag allows you to opt out of\nthis new behavior to enable gradual adoption of the new validations.\n\nThis flag will be removed in a future version of Relay.",
"$ref": "#/$defs/FeatureFlag",
"default": {
"kind": "disabled"
}
},
"disable_more_precise_abstract_selection_raw_response_type": {
"description": "Disable the generation of a more precise raw response type\nfor selections on abstract types.",
"$ref": "#/$defs/FeatureFlag",
"default": {
"kind": "disabled"
}
},
"disable_resolver_reader_ast": {
"description": "Mirror of `enable_resolver_normalization_ast`\nexcludes resolver metadata from reader ast",
"type": "boolean",
"default": false
},
"disable_schema_validation": {
"description": "Disable validating the composite schema (server, client schema\nextensions, Relay Resolvers) after its built.",
"type": "boolean",
"default": false
},
"disallow_required_action_throw_on_semantically_nullable_fields": {
"description": "Disallow @required action THROW on semantically nullable fields.\nWhen enabled, this will prevent the use of THROW action on fields\nthat are semantically nullable (e.g., fields that can legitimately\nbe null in normal operation).",
"$ref": "#/$defs/FeatureFlag",
"default": {
"kind": "disabled"
}
},
"emit_nogrep_annotation": {
"description": "When enabled, the `@nogrep` annotation is included in the docblock\nheader of generated artifacts. This annotation was historically always\nemitted but is no longer needed. This flag allows incremental removal\nacross projects using the rollout variant keyed on the artifact name.",
"$ref": "#/$defs/FeatureFlag",
"default": {
"kind": "disabled"
}
},
"enable_3d_branch_arg_generation": {
"type": "boolean",
"default": false
},
"enable_exec_time_resolvers_directive": {
"description": "Allow per-query opt in to normalization AST for Resolvers with exec_time_resolvers\ndirective. In contrast to enable_resolver_normalization_ast, if this is true, a\nnormalization AST can be generated for a query using the @exec_time_resolvers directive",
"type": "boolean",
"default": false
},
"enable_fragment_argument_transform": {
"description": "Add support for parsing and transforming variable definitions on fragment\ndefinitions and arguments on fragment spreads.",
"type": "boolean",
"default": false
},
"enable_relay_resolver_mutations": {
"description": "Allow relay resolvers to extend the Mutation type",
"type": "boolean",
"default": false
},
"enable_resolver_normalization_ast": {
"description": "Fully build the normalization AST for Resolvers",
"type": "boolean",
"default": false
},
"enable_shadow_resolvers": {
"description": "Enable experimental support for shadow resolvers. Shadow resolvers allow\ndefining a Relay Resolver that \"shadows\" an existing server field,\nproviding an alternative implementation that can be used during\nmigration or for client-side overrides.",
"$ref": "#/$defs/FeatureFlag",
"default": {
"kind": "disabled"
}
},
"enable_strict_custom_scalars": {
"description": "Perform strict validations when custom scalar types are used",
"type": "boolean",
"default": false
},
"enable_typename_discriminated_unions": {
"description": "Automatically add `__typename` selections that enable typegen to emit\ndiscriminated unions for selections on abstract types. Limited and\nrollout variants are keyed by operation or fragment definition name.",
"$ref": "#/$defs/FeatureFlag",
"default": {
"kind": "disabled"
}
},
"enforce_fragment_alias_where_ambiguous": {
"description": "Enforce that you must add `@alias` to a fragment if it may not match,\ndue to type mismatch or `@skip`/`@include`",
"$ref": "#/$defs/FeatureFlag",
"default": {
"kind": "enabled"
}
},
"enforce_module_name_prefix_for_non_haste": {
"description": "Enforce that GraphQL operation and fragment names start with the file\nname. Haste projects have this enforcement automatically; this flag\nis only needed for non-Haste projects that want the same validation.",
"type": "boolean",
"default": false
},
"legacy_include_path_in_required_reader_nodes": {
"description": "The `path` field in `@required` Reader AST nodes is no longer used. But\nremoving them in one diff is too large of a change to ship at once.\n\nThis flag will allow us to use the rollout FeatureFlag to remove them\nacross a number of diffs.",
"$ref": "#/$defs/FeatureFlag",
"default": {
"kind": "disabled"
}
},
"no_inline": {
"description": "For now, this also disallows fragments with variable definitions\nThis also makes @module to opt in using @no_inline internally\nNOTE that the presence of a fragment in this list only controls whether a fragment is *allowed* to\nuse @no_inline: whether the fragment is inlined or not depends on whether it actually uses that\ndirective.",
"$ref": "#/$defs/FeatureFlag",
"default": {
"kind": "disabled"
}
},
"omit_resolver_type_assertions_for_confirmed_types": {
"description": "Skip generating resolver type assertions for resolvers which have\nbeen derived from TS/Flow types.",
"$ref": "#/$defs/FeatureFlag",
"default": {
"kind": "disabled"
}
},
"prefer_fetchable_in_refetch_queries": {
"description": "Feature flag to prefer `fetch_MyType()` generatior over `node()` query generator\nin @refetchable transform",
"type": "boolean",
"default": false
},
"relay_resolver_enable_interface_output_type": {
"description": "Enable returning interfaces from Relay Resolvers without @outputType",
"$ref": "#/$defs/FeatureFlag",
"default": {
"kind": "disabled"
}
},
"shard_extra_artifacts": {
"description": "Shard generated extra artifacts into subdirectories under\n`extraArtifactsOutput` that mirror the source file's relative path,\nhonoring `shardOutput` / `shardStripRegex`.",
"$ref": "#/$defs/FeatureFlag",
"default": {
"kind": "disabled"
}
},
"skip_printing_nulls": {
"$ref": "#/$defs/FeatureFlag",
"default": {
"kind": "disabled"
}
},
"text_artifacts": {
"description": "Enable generation of text artifacts used to generate full query strings\nlater.",
"$ref": "#/$defs/FeatureFlag",
"default": {
"kind": "disabled"
}
},
"use_reader_module_imports": {
"description": "Generate the `moduleImports` field in the Reader AST.",
"$ref": "#/$defs/FeatureFlag",
"default": {
"kind": "disabled"
}
}
},
"additionalProperties": false
},
"JsModuleFormat": {
"description": "Formatting style for generated files.",
"oneOf": [
{
"description": "Common JS style, e.g. `require('../path/MyModule')`",
"type": "string",
"const": "commonjs"
},
{
"description": "Facebook style, e.g. `require('MyModule')`",
"type": "string",
"const": "haste"
}
]
},
"LocalPersistAlgorithm": {
"type": "string",
"enum": [
"MD5",
"SHA1",
"SHA256"
]
},
"LocalPersistConfig": {
"description": "Configuration for local persistence of GraphQL documents.\n\nThis struct contains settings that control how GraphQL documents are persisted locally.",
"type": "object",
"properties": {
"algorithm": {
"description": "The algorithm to use for hashing the operation text.",
"$ref": "#/$defs/LocalPersistAlgorithm",
"default": "MD5"
},
"file": {
"description": "The file path where the persisted documents will be written.",
"type": "string"
},
"include_query_text": {
"description": "Whether to include the query text in the persisted document.",
"type": "boolean",
"default": false
}
},
"additionalProperties": false,
"required": [
"file"
]
},
"ModuleImportConfig": {
"description": "Configuration for @module.",
"type": "object",
"properties": {
"dynamicModuleProvider": {
"description": "Defines the custom import statement to be generated on the\n`ModuleImport` node in ASTs, used for dynamically loading\ncomponents at runtime.",
"anyOf": [
{
"$ref": "#/$defs/ModuleProvider"
},
{
"type": "null"
}
]
},
"operationModuleProvider": {
"description": "Defines the custom import statement to be generated for the\n`operationModuleProvider` function on the `NormalizationModuleImport`\nnode in ASTs. Used in exec time client 3D.",
"anyOf": [
{
"$ref": "#/$defs/ModuleProvider"
},
{
"type": "null"
}
]
},
"surface": {
"description": "Defines the surface upon which @module is enabled.",
"anyOf": [
{
"$ref": "#/$defs/Surface"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"ModuleProvider": {
"oneOf": [
{
"description": "Generates a module provider using JSResource",
"type": "object",
"properties": {
"mode": {
"type": "string",
"const": "JSResource"
}
},
"required": [
"mode"
]
},
{
"description": "Generates a custom JS import, Use `<$module>` as the placeholder\nfor the actual module. e.g. `\"() => import('<$module>')\"`",
"type": "object",
"properties": {
"mode": {
"type": "string",
"const": "Custom"
},
"statement": {
"$ref": "#/$defs/StringKey"
}
},
"required": [
"mode",
"statement"
]
}
]
},
"MultiProjectConfigFile": {
"description": "Schema of the compiler configuration JSON file.",
"type": "object",
"properties": {
"$schema": {
"description": "The user may hard-code the JSON Schema for their version of the config.",
"type": [
"string",
"null"
]
},
"codegenCommand": {
"type": [
"string",
"null"
],
"default": null
},
"excludes": {
"description": "Glob patterns that should not be part of the sources even if they are\nin the source set directories.",
"type": "array",
"default": [
"**/node_modules/**",
"**/__mocks__/**",
"**/__generated__/**"
],
"items": {
"type": "string"
}
},
"featureFlags": {
"description": "Enable and disable experimental or legacy behaviors.\nWARNING! These are not stable and may change at any time.",
"$ref": "#/$defs/FeatureFlags",
"default": {
"allow_legacy_relay_resolver_tag": {
"kind": "disabled"
},
"allow_output_type_resolvers": {
"kind": "disabled"
},
"allow_required_in_mutation_response": {
"kind": "disabled"
},
"allow_resolver_non_nullable_return_type": {
"kind": "disabled"
},
"allow_resolvers_in_mutation_response": {
"kind": "disabled"
},
"compact_query_text": {
"kind": "disabled"
},
"disable_deduping_common_structures_in_artifacts": {
"kind": "disabled"
},
"disable_edge_type_name_validation_on_declerative_connection_directives": {
"kind": "disabled"
},
"disable_full_argument_type_validation": {
"kind": "disabled"
},
"disable_more_precise_abstract_selection_raw_response_type": {
"kind": "disabled"
},
"disable_resolver_reader_ast": false,
"disable_schema_validation": false,
"disallow_required_action_throw_on_semantically_nullable_fields": {
"kind": "disabled"
},
"emit_nogrep_annotation": {
"kind": "disabled"
},
"enable_3d_branch_arg_generation": false,
"enable_exec_time_resolvers_directive": false,
"enable_fragment_argument_transform": false,
"enable_relay_resolver_mutations": false,
"enable_resolver_normalization_ast": false,
"enable_shadow_resolvers": {
"kind": "disabled"
},
"enable_strict_custom_scalars": false,
"enable_typename_discriminated_unions": {
"kind": "disabled"
},
"enforce_fragment_alias_where_ambiguous": {
"kind": "enabled"
},
"enforce_module_name_prefix_for_non_haste": false,
"legacy_include_path_in_required_reader_nodes": {
"kind": "disabled"
},
"no_inline": {
"kind": "disabled"
},
"omit_resolver_type_assertions_for_confirmed_types": {
"kind": "disabled"
},
"prefer_fetchable_in_refetch_queries": false,
"relay_resolver_enable_interface_output_type": {
"kind": "disabled"
},