Skip to content
This repository has been archived by the owner on Oct 17, 2020. It is now read-only.

Latest commit

 

History

History
22 lines (16 loc) · 893 Bytes

07-Schema-Diff.md

File metadata and controls

22 lines (16 loc) · 893 Bytes

GraphQL Schema Diff

Showing the diff between two schemas

Sometimes it might be helpful to compare two GraphQL schemas with each other. For example, when working with multiple GraphQL APIs that each represent the same service but deployed to different development environments (e.g. dev, staging or prod). The graphql diff command allows to quickly get an overview of the changes between two GraphQL schemas. They are compared via introspection queries.

Assume the following .graphqlconfig:

projects:
  hello-world:
    extensions:
      endpoints:
        dev: https://myapiserver.com/graphql/dev
        prod: https://myapiserver.com/graphql/prod

Example: Show the difference between the two GraphQL schemas on the dev and prod endpoints.

graphql diff --endpoint dev --target prod --project hello-world