A small full-stack web app for editing federated subgraph schemas, running Apollo Federation composition, inspecting the composed supergraph SDL, and generating query plans for operations against that supergraph. Use Export to share a single JSON file with support so they can Import the same subgraphs, federation version label, and operation to reproduce composition or query-plan issues locally.
The code in this repository is experimental and has been provided for reference purposes only. Community feedback is welcome but this project may not be supported in the same way that repositories in the official Apollo GraphQL GitHub organization are. If you need help you can file an issue on this repository, contact Apollo to talk to an expert, or create a ticket directly in Apollo Studio.
Optional: add a UI screenshot at docs/playground-screenshot.png and reference it here for README polish.
- Tabbed subgraph editors (name, routing URL, GraphQL schema) with a default products + reviews example
- Federation version free-text field with optional datalist hints (same strings you would use in
supergraph.yaml/ Rover; stored in exports; see limitations below) - Compose calls
@apollo/compositionand shows supergraph SDL, composition errors, or hints - Query plan runs
@apollo/query-planneragainst the last successful supergraph and the editable operation - Import / Export of playground state as JSON for bug reports and support handoff
- Draggable split panes for layout
Requirements: Node.js 20+ (22 recommended) and npm.
npm installnpm testIncludes a regression that builds an intentionally incompatible pair of subgraphs, serializes them through the same export → import JSON path the UI uses, and asserts composition still fails before and after the round-trip (useful for support repros).
Runs the API on http://localhost:4000 and the Vite dev server on http://localhost:5173 with /api proxied to the backend.
npm run devOpen the UI at http://localhost:5173.
Builds the frontend into backend/public and compiles the server.
npm run build
npm startThen open http://localhost:4000.
docker compose up --buildOpen http://localhost:3000.
| Method | Path | Purpose |
|---|---|---|
POST |
/api/compose |
Body: { federationVersion?, subgraphs: [{ name, url, schema }] } |
POST |
/api/query-plan |
Body: { supergraphSdl, operation, operationName? } |
GET |
/health |
Liveness |
Version 1.0 JSON includes federationVersion, subgraphs (name, url, schema), and operation. This matches what you need to reproduce issues outside the UI (for example with Rover supergraph compose once you map subgraphs to files or config).
- Federation version in the UI is included in exports for documentation; composition and query planning use the
@apollo/composition/@apollo/query-plannerversions pinned in backend/package.json, not multiple historical composition binaries like Rover’s--federation-version. @apollo/query-planneris an internal-style API and may change between releases; this app pins versions accordingly.- Apollo Federation 2 composition is subject to the Elastic License v2 for the Apollo composition and query planner packages.
- Local supergraph development with the router is documented in Rover
dev. - For inspiration on performance-oriented router testing, see community examples such as router-performance-test (repository availability may vary).