// When enabled for a given name, allows `@RelayResolver` as a legacy
alias for `@relayType` / `@relayField`.
allow_legacy_relay_resolver_tag?:
FeatureFlag = {kind: "disabled",
} // @outputType resolvers are a discontinued experimental feature. This flag
allows users to allowlist old uses of this feature while they work to
remove them. Weak types (types without an `id` field) returned by a Relay
Resolver should be limited to types defined using `@RelayResolver` with `@weak`.
If using the "limited" feature flag variant, users can allowlist a
specific list of field names.
https://relay.dev/docs/next/guides/relay-resolvers/defining-types/#defining-a-weak-type
allow_output_type_resolvers?:
FeatureFlag = {kind: "disabled",
} // @required with an action of THROW is read-time feature that is not
compatible with our mutation APIs. We are in the process of removing
any existing examples, but this flag is part of a process of removing
any existing examples.
allow_required_in_mutation_response?:
FeatureFlag = {kind: "disabled",
} // Allow non-nullable return types from resolvers.
allow_resolver_non_nullable_return_type?:
FeatureFlag = {kind: "disabled",
} // Relay Resolvers are a read-time feature that are not actually handled in
our mutation APIs. We are in the process of removing any existing
examples, but this flag is part of a process of removing any existing
examples.
allow_resolvers_in_mutation_response?:
FeatureFlag = {kind: "disabled",
} // Print queries in compact form
compact_query_text?:
FeatureFlag = {kind: "disabled",
} // Temporarily gate the rollout of structural deduplication in generated
raw response types. This flag can be removed once every project has
regenerated its artifacts with the optimization enabled.
dedupe_common_structures_in_raw_response_types?:
FeatureFlag = {kind: "disabled",
} // Skip the optimization which extracts common JavaScript structures in
generated artifacts into numbered variables and uses them by reference
in each position in which they occur.
This optimization can make it hard to follow changes to generated
code, so being able to disable it can be helpful for debugging.
To disable deduping for just one fragment or operation's generated
artifacts:
```json
"disable_deduping_common_structures_in_artifacts": {
{ "kind": "limited", "allowList": ["<operation_or_fragment_name>"] }
}
```
disable_deduping_common_structures_in_artifacts?:
FeatureFlag = {kind: "disabled",
} // Skip the optimization which extracts common structures in generated
raw response types into private type aliases and uses them by reference
in each position in which they occur.
This optimization can make it hard to follow changes to generated
types, so being able to disable it can be helpful for debugging.
disable_deduping_common_structures_in_raw_response_types?:
FeatureFlag = {kind: "disabled",
} // Disable validation of the `edgeTypeName` argument on `@prependNode` and `@appendNode`.
disable_edge_type_name_validation_on_declerative_connection_directives?:
FeatureFlag = {kind: "disabled",
} // Disable full GraphQL argument type validation. Historically, we only applied argument type
validation to the query that was actually going to be persisted and sent
to the server. This meant that we didn't typecheck arguments passed to
Relay Resolvers or Client Schema Extensions.
We also permitted an escape hatch of `uncheckedArguments_DEPRECATED` for
defining fragment arguments which were not typechecked.
We no-longer support `uncheckedArguments_DEPRECATED`, and we typecheck
both client and server arguments. This flag allows you to opt out of
this new behavior to enable gradual adoption of the new validations.
This flag will be removed in a future version of Relay.
disable_full_argument_type_validation?:
FeatureFlag = {kind: "disabled",
} // Disable the generation of a more precise raw response type
for selections on abstract types.
disable_more_precise_abstract_selection_raw_response_type?:
FeatureFlag = {kind: "disabled",
} // Mirror of `enable_resolver_normalization_ast`
excludes resolver metadata from reader ast
disable_resolver_reader_ast?: boolean
// Disable validating the composite schema (server, client schema
extensions, Relay Resolvers) after its built.
disable_schema_validation?: boolean
// Disallow @required action THROW on semantically nullable fields.
When enabled, this will prevent the use of THROW action on fields
that are semantically nullable (e.g., fields that can legitimately
be null in normal operation).
disallow_required_action_throw_on_semantically_nullable_fields?:
FeatureFlag = {kind: "disabled",
} // TypeScript only. Changes how you write GraphQL documents, and in
return gives you type safety without generics.
Documents move to the call form, ``graphql(`...`)``, which becomes the
required spelling for the project -- the tagged template
`` graphql`...` `` becomes an error. `relay codemod fix-all` rewrites
existing documents for you.
In exchange, `useLazyLoadQuery` and `useFragment` take their variable
and response types from the literal itself, so they no longer need an
explicit type argument or an import of the generated artifact.
Only the spelling has to change. A call site that already passes an
explicit type argument, `useLazyLoadQuery<FooQuery>(...)`, keeps
compiling as-is; the argument just stops being necessary. The one
exception is `useFragment<Foo$key>(...)`, which has to drop its type
argument -- `useFragment` infers the key from the ref it is given, so
that argument was always redundant.
Limited and rollout variants are keyed by operation or fragment
definition name, and stage only the typing -- the call form is required
throughout the project either way.
emit_document_type_registry?:
FeatureFlag = {kind: "disabled",
} // When enabled, the `@nogrep` annotation is included in the docblock
header of generated artifacts. This annotation was historically always
emitted but is no longer needed. This flag allows incremental removal
across projects using the rollout variant keyed on the artifact name.
emit_nogrep_annotation?:
FeatureFlag = {kind: "disabled",
} // Mirror of `emit_nogrep_annotation` for the fb-only Hack artifacts
(query preloaders and text artifacts). Kept separate so the Hack and
JavaScript corpora can be migrated independently; the Hack corpus is
roughly four times the size and needs its own rollout schedule.
emit_nogrep_annotation_hack?:
FeatureFlag = {kind: "enabled",
} enable_3d_branch_arg_generation?: boolean
// Allow per-query opt in to normalization AST for Resolvers with exec_time_resolvers
directive. In contrast to enable_resolver_normalization_ast, if this is true, a
normalization AST can be generated for a query using the @exec_time_resolvers directive
enable_exec_time_resolvers_directive?: boolean
// Add support for parsing and transforming variable definitions on fragment
definitions and arguments on fragment spreads.
enable_fragment_argument_transform?: boolean
// Allow relay resolvers to extend the Mutation type
enable_relay_resolver_mutations?: boolean
// Fully build the normalization AST for Resolvers
enable_resolver_normalization_ast?: boolean
// Enable experimental support for shadow resolvers. Shadow resolvers allow
defining a Relay Resolver that "shadows" an existing server field,
providing an alternative implementation that can be used during
migration or for client-side overrides.
enable_shadow_resolvers?:
FeatureFlag = {kind: "disabled",
} // Perform strict validations when custom scalar types are used
enable_strict_custom_scalars?: boolean
// Automatically add `__typename` selections that enable typegen to emit
discriminated unions for selections on abstract types. Limited and
rollout variants are keyed by operation or fragment definition name.
enable_typename_discriminated_unions?:
FeatureFlag = {kind: "disabled",
} // Enforce that you must add `@alias` to a fragment if it may not match,
due to type mismatch or `@skip`/`@include`
enforce_fragment_alias_where_ambiguous?:
FeatureFlag = {kind: "enabled",
} // Enforce that GraphQL operation and fragment names start with the file
name. Haste projects have this enforcement automatically; this flag
is only needed for non-Haste projects that want the same validation.
enforce_module_name_prefix_for_non_haste?: boolean
// The `path` field in `@required` Reader AST nodes is no longer used. But
removing them in one diff is too large of a change to ship at once.
This flag will allow us to use the rollout FeatureFlag to remove them
across a number of diffs.
legacy_include_path_in_required_reader_nodes?:
FeatureFlag = {kind: "disabled",
} // For now, this also disallows fragments with variable definitions
This also makes @module to opt in using @no_inline internally
NOTE that the presence of a fragment in this list only controls whether a fragment is *allowed* to
use @no_inline: whether the fragment is inlined or not depends on whether it actually uses that
directive.
// Skip generating resolver type assertions for resolvers which have
been derived from TS/Flow types.
omit_resolver_type_assertions_for_confirmed_types?:
FeatureFlag = {kind: "disabled",
} // Feature flag to prefer `fetch_MyType()` generatior over `node()` query generator
in @refetchable transform
prefer_fetchable_in_refetch_queries?: boolean
// Enable returning interfaces from Relay Resolvers without @outputType
relay_resolver_enable_interface_output_type?:
FeatureFlag = {kind: "disabled",
} // Shard generated extra artifacts into subdirectories under
`extraArtifactsOutput` that mirror the source file's relative path,
honoring `shardOutput` / `shardStripRegex`.
shard_extra_artifacts?:
FeatureFlag = {kind: "disabled",
} skip_printing_nulls?:
FeatureFlag = {kind: "disabled",
} // Enable generation of text artifacts used to generate full query strings
later.
// Generate the `moduleImports` field in the Reader AST.
use_reader_module_imports?:
FeatureFlag = {kind: "disabled",
}