0.0.2 • Published 7 years ago
graphql-schema-comparator v0.0.2
GraphQL Schema Comparator
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.
Installation
yarn add graphql-schema-comparator
CLI Usage
graphql-diff OLD_SCHEMA NEW_SCHEMA
graphql-diff help
Examples
$ 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`
Programatic Usage
import diff from 'graphql-schema-comparator';
const changes = diff(schemaA, schemaB);
Related
This library was ported to NodeJS from Ruby's GraphQL Schema Comparator
License
MIT © Kamil Kisiela