A GraphQL compiler and runtime for building data-driven React applications with colocated data requirements. The compiler processes GraphQL fragments and queries embedded in JavaScript/TypeScript files, generating optimized artifacts for runtime. It features static type generation, persisted queries, schema validation, and integration with Relay's runtime. The stable version is v20.1.1, with regular monthly releases including breaking changes, new features, and bug fixes. Key differentiators: first-class support for React, advanced data masking, incremental data delivery, and strong integration with the Relay ecosystem including resolvers and client state management.
npm install atl-relay-compilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Runs the Relay compiler once on the src directory, outputs generated artifacts to ./__generated__, using TypeScript language, disabling watchman.
Ensure config_id is provided via a separate custom directive or config file.
Add @alias directive to all conditional fragments. See documentation for @alias directive.
Ensure your GraphQL schema definition is fully compliant with the latest spec. Use `--strict` flag for validation.
Replace 'customScalars' with 'customScalarTypes' in your Relay config file.
Ensure you have a valid schema file in your repo and specify its path via --schema flag.
Explicitly set artifactDirectory in your relay config to avoid cluttering source files.
Install it: npm install --save-dev relay-compiler
Ensure --schema flag points to an existing GraphQL schema file.
Create a relay.config.js file in your project root with appropriate configuration.
Change 'customScalars' to 'customScalarTypes' in your config file.