Compiler Configuration
Compiler Config Options​
For information about where the Relay compiler looks for its config file, or a minimal config, see the Relay Compiler page.
If you need more advanced options of the Relay Compiler Config, the exhaustive full schema can be found below. The shape of the Relay Compiler Config is given as ConfigFile
. Note that while the shapes are documented in pseudo TypeScript, the compiler is parsing them in Rust so some subtle differences may exist.
Install the Relay VSCode extension to get autocomplete, hover tips, and type checking for the options in your Relay config.
Config File
Relay's configuration file. Supports a single project config for simple use cases and a multi-project config for cases where multiple projects live in the same repository. In general, start with the SingleProjectConfigFile.
Config File Project
Connection Interface
Configuration where Relay should expect some fields in the schema.
Custom Type
Defines a custom GraphQL descrbing a custom scalar.
Custom Type Import
Defines a module path and export name of the Flow or TypeScript type descrbing a GraphQL custom scalar.
Defer Stream Interface
Configuration where Relay should expect some fields in the schema.
Diagnostic Level
Levels for reporting errors in the compiler.
Diagnostic Report Config
Configuration for all diagnostic reporting in the compiler
Feature Flag
Feature Flags
Js Module Format
Formatting style for generated files.
Local Persist Config
Configuration for local persistence of GraphQL documents. This struct contains settings that control how GraphQL documents are persisted locally.
Module Import Config
Configuration for @module.
Module Provider
Multi Project Config File
Schema of the compiler configuration JSON file.
Non Node Id Fields Config
Configuration of Relay's validation for `id` fields outside of the `Node` interface.
Persist Config
Configuration for how the Relay Compiler should persist GraphQL queries.
Project Name
Represents the name of a project in the Relay configuration.
Remote Persist Config
Configuration for remote persistence of GraphQL documents.
Resolver Context Type Input
Describes the type to import and use as the context for Relay Resolvers.
Resolver Context Type Input Package
Specifies how Relay can import the Resolver context type from a named package
Resolver Context Type Input Path
Specifies how Relay can import the Resolver context type from a path
Resolvers Schema Module Config
Configuration for resolvers_schema_module generation
Rollout Range
A utility to enable gradual rollout of large codegen changes. Allows you to specify a range of percentages to rollout.
Saved State Clock Data
Holds extended clock data that includes source control aware query metadata. <https://facebook.github.io/watchman/docs/scm-query.html>
Schema Config
Scm Aware Clock Data
Holds extended clock data that includes source control aware query metadata. <https://facebook.github.io/watchman/docs/scm-query.html>