Custom Relay Modern compiler that adds persisted query support, allowing developers to generate query IDs, null query text in production, and a queryMap.json for server-side query resolution. Current version 1.8.3 works with Relay Compiler v1.6 and Node v10. Key differentiator: supports direct compilation from graphql-js schema files (schema.js) in addition to schema.graphql or schema.json, enabling a single-step build pipeline. Last updated 2019, likely inactive.
npm install relay-compiler-plusNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates installation, CLI usage to generate persisted queries, server-side middleware setup, and client fetch modification.
Migrate to Relay Compiler with –persist-config or use relay-persisted-query-directive from GraphQL Tada.
Always prefix the command with NODE_ENV=production.
Ensure schema.graphql is one level above src (e.g., ../src).
Stick with Relay v1.6.x or use alternative persisted query solution for newer Relay.
Install relay-compiler@1.6.x: yarn add relay-compiler@1.6.0
Upgrade graphql to latest: yarn upgrade graphql --latest
Ensure you run with NODE_ENV=production or check that the src path is correct.
Use named import: import { matchQueryMiddleware } from 'relay-compiler-plus'