local/tools
dev / Single executable / v1.0.2

GraphQL Diff

Compare two GraphQL schemas and classify breaking, dangerous and safe changes.

Install

  • install
    irm https://raw.githubusercontent.com/chayprabs/localtools/main/graphql-diff/install.ps1 | iex
  • update
    localtools-graphql-diff update
  • remove
    localtools-graphql-diff uninstall

Opens at http://127.0.0.1:47112 in your browser. Run localtools-graphql-diff --help for the command line. Set LOCALTOOLS_NO_OPEN=1 to install without opening it.

Direct download

PlatformFileSize
Windows x64graphql-diff-1.0.2-windows-x64.zip43.7 MB
macOS Apple Silicongraphql-diff-1.0.2-macos-arm64.zip30.6 MB
macOS Intelgraphql-diff-1.0.2-macos-x64.zip32.4 MB
Linux x64graphql-diff-1.0.2-linux-x64.zip41.0 MB
Linux ARM64graphql-diff-1.0.2-linux-arm64.zip41.3 MB

SHA-256 checksums are in the release notes; the install scripts verify them for you.

See it

How to use

  1. Run localtools-graphql-diff; the page opens at http://127.0.0.1:47112.
  2. Paste or drop the old and new schema (SDL .graphql files or introspection JSON; several files per side are merged).
  3. Optionally drop your client operation files to see which queries the change breaks.
  4. Press Compare, filter by breaking / dangerous / safe, copy the Markdown for your PR or download JSON.
  5. In CI: localtools-graphql-diff old.graphql new.graphql --fail-on breaking (exit 2 on breaking changes).

FAQ

Are the results the same as graphql-inspector?

Yes. It runs @graphql-inspector/core 8 and loads schemas and applies rules in the same order as the graphql-inspector CLI. On GitHub, GitLab, Saleor, Shopify and SWAPI schema histories, with every option combination, the lists are identical.

What is the difference between breaking and dangerous?

Breaking changes make existing valid operations fail (removed fields, changed types, new required arguments). Dangerous changes keep operations valid but can change behaviour (new enum values, changed default values, new union members).

Can it use an introspection result instead of SDL?

Yes: a JSON file with __schema or data.__schema works on either side, and can be compared with an SDL file.

How big can schemas be?

Up to 32 MB per side and 200,000 types; 150,000 types with 50,000 breaking changes compare in about 15 seconds. Each comparison runs in its own worker with a 60 s limit.

Does anything get uploaded?

No. Everything runs in the local program on 127.0.0.1 with no network requests.