Skip to content

chayprabs/graphql-breaking-changes

GraphQLGuard

Diff two GraphQL schemas online and find breaking and dangerous changes — with operation coverage and Apollo Federation composition checks. Everything runs in your browser; your schemas never leave your device.

CI

Features

  • Schema diff — Paste two SDL documents or introspection JSON; get breaking, dangerous, and safe changes with rename suggestions (namefullName).
  • Operation coverage — Drop multiple .graphql operation files; validate against the new schema with per-operation reasons.
  • Federation — Compose Apollo Federation v2 supergraphs or diff subgraph SDLs in isolation (F4.2).
  • Lint — Naming, deprecation, and description rules (Spectral-style defaults).
  • Reports — Export HTML, JSON, or Markdown from any tab (diff, coverage, lint, federation).
  • Monaco editors — GraphQL syntax highlighting (lazy-loaded).
  • Web Worker — Diff and composition run off the main thread.
  • PWA — Installable, works offline after first load.
  • Privacy — Browser-only; optional localStorage for editor state; one-click clear.
  • CLInpx graphql-guard old.graphql new.graphql exits 1 on breaking changes.

Sample SDL files live in packages/web/public/samples/.

Quick start

pnpm install
pnpm dev

Open http://localhost:5173.

Self-host

pnpm build
# Static files in packages/web/dist

Or with Docker:

docker compose up --build

Visit http://localhost:8080.

Monorepo layout

packages/
  core/   # @graphql-guard/core — diff, coverage, federation, lint
  web/    # Vite + React playground

Library API

import {
  diff,
  operationCoverage,
  composeFederation,
  diffSubgraphs,
  lintSchema,
  formatSdl,
  reportToJson,
} from "@graphql-guard/core";

const changes = diff(oldSdl, newSdl);
const coverage = operationCoverage([operationSdl], newSdl);
const composition = composeFederation([{ name: "users", sdl: "..." }]);
const subgraphChanges = diffSubgraphs(oldSubgraphs, newSubgraphs);

CLI

pnpm --filter @graphql-guard/cli build
node packages/cli/dist/cli.js packages/web/public/samples/small-old.graphql packages/web/public/samples/small-new.graphql
# exit code 1 if breaking changes exist

Privacy and legal

This tool is browser-only. No schema data is sent to a backend for normal use.

Document Hosted Repository
Privacy Policy /privacy on the hosted site PRIVACY_POLICY.md
Terms & Conditions /terms TERMS.md
MIT License /license LICENSE

Use of the hosted site and software is subject to these documents, including disclaimers of warranties, limitations of liability, and indemnification.

Community

License

MIT — see LICENSE.

Topics

graphql graphql-schema graphql-diff breaking-changes api-versioning graphql-federation graphql-inspector sdl api-governance graphql-tools schema-diff dangerous-changes graphql-validator api-design online-tool

About

Diff two GraphQL schemas online and find breaking and dangerous changes - operation coverage and federation composition checks.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors