GraphQL Schema Comparator ouputs a list of changes between two GraphQL schemas. Every change is precisely explained and marked as breaking, non-breaking or dangerous.
yarn add graphql-schema-comparator
graphql-diff OLD_SCHEMA NEW_SCHEMA
graphql-diff help
$ graphql-diff OLD_SCHEMA NEW_SCHEMA
Detected the following changes between schemas:
🛑 Field `name` was removed from object type `Post`
⚠️ Enum value `ARCHIVED` was added to enum `Status`
✅ Field `createdAt` was added to object type `Post`
import diff from 'graphql-schema-comparator';
const changes = diff(schemaA, schemaB);
This library was ported to NodeJS from Ruby's GraphQL Schema Comparator
MIT © Kamil Kisiela