Registry / http-networking / relay-compiler-experimental

relay-compiler-experimental

JSON →
library0.0.1jsnpmunverified

Experimental version of the Relay Compiler, part of Meta's Relay GraphQL client ecosystem. This package (v0.0.1) is an unstable pre-release intended for testing new compiler features before they migrate to the stable relay-compiler package. It follows the same release cadence as the main Relay monorepo but may introduce breaking changes without notice. Key differentiators: early access to compiler experiments, potential for rapid iteration, but no stability guarantees. Not recommended for production use.

npm install relay-compiler-experimental
INSTALL
IMPORT
SIG · RELAY-COMPILER-EXP
R
relay-compiler-experimental
http-networkingjavascriptv0.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import relayCompiler from 'relay-compiler-experimental'
const relayCompiler = require('relay-compiler-experimental')
Package is ESM-only; CommonJS require not supported.
compile
import { compile } from 'relay-compiler-experimental'
import compile from 'relay-compiler-experimental'
Named export, not default.
Program
import { Program } from 'relay-compiler-experimental'
import { Program } from 'relay-compiler'
Type available only in experimental package.

Demonstrates compiling a GraphQL query with the experimental compiler, specifying schema and output directory.

import { compile } from 'relay-compiler-experimental'; const source = ` query UserQuery { user(id: "1") { name } } `; const result = compile(source, { schemaPath: './schema.graphql', artifactDirectory: './__generated__', }); console.log(result);
Debug
Known issues
deprecatedrelay-compiler-experimental is no longer maintained; use relay-compiler instead.
fix
Migrate to relay-compiler (stable) which includes most experimental features.
affects: >=0.0.0
breakingBreaking changes may occur between minor versions without a major version bump.
fix
Pin to exact version and test upgrades thoroughly.
affects: >=0.0.0
gotchaExperimental features may conflict with stable relay-compiler artifacts; avoid using both in same project.
fix
Use only one compiler package per project.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'relay-compiler-experimental'
Package not installed or not resolved correctly.
fix
Run 'npm install relay-compiler-experimental' or check package.json.
SyntaxError: Unexpected token 'export'
Using CommonJS require with ESM-only package.
fix
Use ESM imports or set type: "module" in package.json.
TypeError: relayCompiler is not a function
Importing default export incorrectly; package has named exports.
fix
Use named imports: import { compile } from 'relay-compiler-experimental'.
Upgrade
Version history
0.0.1latest on npm
Audit
Dependencies
graphqlrequiredGraphQL parser and utilities required for compilation
Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
relay-compiler-experimental — npm install relay-compiler-experimental · libregistry