Detect changes to your GraphQL Schema and prevent breaking your existing applications. With GraphQL Inspector you get a list of breaking, potentially dangerous and safe changes on every Pull Request. Integrate it with GitHub, BitBucket, GitLab or any Continous Integration.
Install our GitHub Application to check Pull Requests and commits.
Use our GitHub Action in few steps.
GraphQL Inspector offers a version of our CLI that is better suited for Continous Integrations. Learn more how to use it.
Run the following command:
-r, --require <s>- require a module
-t, --token <s>- an access token
-h, --header <s>- set http header (`--header 'Auth: Basic 123')
--method- method on url schema pointers (default: POST)
--federation- Support Apollo Federation directives (default: false)
--aws- Support AWS Appsync directives and scalar types (default: false)
A list of all differences between two schemas. GraphQL Inspector defines three kinds of changes:
- Non breaking change
- Dangerous Change
- Breaking change
When there's at least one breaking change, process fails, otherwise it succeeds.
Compare your local schema against a remote server:
Compare your local schema against a schema on a master branch (github):
In order to customize the diff's behavior, you're able to use a set of rules:
Turns every dangerous change to be a breaking change.
Every removal of a deprecated field is considered as a breaking change. With that flag you can turn it into a dangerous change so it won't fail a process or a CI check.
Changes of descriptions are filtered out and are not displayed in the CLI result.
It's possible to write your own rules.
First, you need a module:
Now, you can use that module as a rule:
If you want to do a diff between multiple remote schemas, each with different set of authentication headers, you can do it with
--right-header flags like so:
graphql-inspector diff http://your-schema-1/graphql http://your-schema-2/graphql --left-header 'Auth: Basic 123' --right-header 'Auth: Basic 345'
--left-header will get passed to
--right-header will get passed to
--right-header overrides the