packages/relay-e2e-test/README.md
Markdown-driven end-to-end tests for Relay. Each test is a self-contained .md file that defines a GraphQL server (via Grats), a Relay-powered React component, and optional interaction steps. The test harness extracts the code blocks, compiles them with Grats + relay-compiler, renders with React Testing Library, runs interactions, and snapshot-tests the output.
Tests run against Relay runtime packages from source (packages/relay-runtime/ and packages/react-relay/), so changes are reflected immediately without a build step.
From the repo root:
yarn test:e2e
Run a single fixture by name:
yarn test:e2e -- --testNamePattern defer
The e2e package has its own node_modules (isolated react@19, graphql@16):
cd packages/relay-e2e-test && yarn install
The babel-plugin-relay must be built before running tests:
yarn build
The test harness resolves the relay-compiler binary in this order:
RELAY_COMPILER_BINARY env varcompiler/target/debug/relaynode_modules/.bin/relay-compilerTo test compiler changes, build with cargo build --manifest-path=compiler/Cargo.toml --bin relay and re-run tests.
For the complete writing guide including fixture format, server/client code patterns, the interaction DSL, and snapshot behavior, see .llms/skills/relay-e2e-test.md.