Skip to main content

🚀 Beta: All Pro and Team features are free. Install on GitHub →

GraphQL Schema Diff

GraphQL Diff Tool — Detect Every Change, Automatically

Compare any two GraphQL schemas and get a complete, categorized report of every breaking change, deprecation, and schema modification — in seconds.

What the Diff Engine Detects

CodeRifts goes far beyond a simple text diff. It understands the semantics of your GraphQL schema and categorizes every change by type and severity.

Breaking Change Types

  • Field removed from a type
  • Argument removed from a field
  • Type changed for a field
  • Required argument added to a field
  • Enum value removed
  • Interface removed from a type
  • Input field removed
  • Input field type changed
  • Input field required added
  • Directive removed

Non-Breaking Changes

  • New field added to a type
  • New argument added to a field
  • New type added
  • New enum value added
  • New directive added
  • Description updated

CodeRifts also detects deprecations, security findings, and policy violations — giving you a complete picture of what changed and why it matters.

Why Automated GraphQL Diffing Matters

Manually comparing two versions of a GraphQL schema is not only tedious but also highly error-prone. As GraphQL APIs evolve, their schemas can grow to be very complex, with intricate relationships between types, fields, and arguments. A simple text-based diff, like the one you might see in a Git commit, is insufficient because it fails to understand the semantic meaning of the GraphQL structure.

Automated tooling is essential for managing this complexity. A purpose-built GraphQL diff tool doesn't just compare text; it parses the schema, resolves all references, and understands the hierarchical structure of the API contract. For example, changing a field from optional to required within a type is a significant breaking change, but it might appear as a minor, one-word alteration in a text file. Without an automated, semantically-aware diff, teams risk shipping breaking changes unknowingly.

How CodeRifts Performs the Diff

CodeRifts provides a sophisticated diff engine that goes beyond simple comparison to deliver a comprehensive and actionable report. At its core, the process involves parsing both the old and new GraphQL schemas. The engine fully understands the schema definition language, creating a complete, canonical representation of each API version.

Once the schemas are fully resolved, CodeRifts performs a semantic comparison of the two structures. It categorizes every detected change—from a removed field to a modified type—according to its severity: breaking, non-breaking, or deprecation. Each change is then assigned a risk score based on factors like the type of change and its potential impact on consumers. The final output is a rich, interactive report that helps teams make informed decisions.

Use Cases

CI/CD Pipelines

By incorporating CodeRifts into your Continuous Integration and Continuous Deployment (CI/CD) pipeline, you can automatically fail builds that introduce high-risk or unauthorized breaking changes. You can use our CLI or REST API to add a diff check as a required step in your deployment workflow.

Pre-Merge Checks

With the CodeRifts GitHub App, every pull request that modifies a GraphQL schema file gets an automatic check. A detailed comment is posted directly on the PR, showing a summary of the changes and a link to the full diff report. This enables developers and reviewers to understand the impact of their changes before they are merged.

API Versioning Strategy

Automated diffing is fundamental to a sound API versioning strategy. By understanding the nature of every change, you can make deliberate decisions about when to release a new minor version (for non-breaking, backward-compatible changes) versus a new major version (for breaking changes).

Schema Evolution Management

GraphQL schemas are designed to evolve, but managing these changes without impacting existing clients is crucial. CodeRifts helps you track and understand every modification, ensuring that your schema evolution is intentional and safe, preventing unexpected client-side errors.

Three Ways to Diff

🌐

In-Browser

Upload two schemas to app.coderifts.com/try and get a full report instantly. No signup required.

🔧

On Every PR

Install the GitHub App and CodeRifts automatically diffs your GraphQL schemas on every pull request. Zero config.

Via API or CLI

Use the REST API or CLI to integrate diff into any CI/CD pipeline, pre-commit hook, or custom workflow.

More Than a Diff — A Full Governance Report

Every diff includes risk scoring, policy enforcement, security analysis, and an auto-generated changelog — giving you a complete picture of what changed and why it matters.

📊

Risk Scoring

Get an objective risk score (0-100) for every change, helping you prioritize and manage API evolution with confidence.

🔒

Policy Enforcement

Define custom policies to automatically block or warn on specific breaking changes, ensuring compliance and consistency.

📝

Auto-Changelog

Automatically generate a human-readable changelog from your diffs, making it easy to communicate API updates to consumers.

Trusted by Leading API Teams

ACME Corp Globex Corporation Wayne Enterprises Cyberdyne Systems

Frequently Asked Questions

What is a GraphQL diff?

A GraphQL diff is the result of comparing two versions of a GraphQL schema to identify all the changes between them. Unlike a simple text diff, a proper GraphQL diff tool understands the structure and semantics of the schema. It can pinpoint specific changes like a removed field, a modified type, or a new required argument, and classify them as breaking or non-breaking.

How do I compare two GraphQL schemas?

You can compare two GraphQL schemas using a specialized tool like CodeRifts. You can use our free in-browser tool by simply uploading your two schema files. For a more automated workflow, you can integrate our GitHub App to get a comparison on every pull request, or use our CLI or REST API to run a comparison in your own scripts or CI/CD pipelines.

What counts as a breaking change in GraphQL?

A breaking change in GraphQL is any modification to a schema that can cause existing client applications to fail. Common examples include removing a field from a type, adding a new required argument to a field, or changing the type of a field. CodeRifts maintains a comprehensive list of common breaking change types that it detects automatically.

Can I use this in CI/CD?

Absolutely. Integrating GraphQL diffing into your CI/CD pipeline is a best practice for preventing breaking changes from reaching production. CodeRifts provides both a CLI tool and a REST API that you can easily incorporate into your existing workflows, whether you use Jenkins, GitLab CI, CircleCI, or any other automation server. You can configure your pipeline to fail a build if a high-risk breaking change is detected.

Stop shipping breaking API changes

Integrate CodeRifts into your workflow and ensure every GraphQL schema change is safe and intentional.

Install on GitHub →