graphql-schema-comparator
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

GraphQL Schema Comparator

CircleCI npm version code style: prettier renovate-app badge

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.

Example

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

Readme

Keywords

Package Sidebar

Install

npm i graphql-schema-comparator

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

677 kB

Total Files

139

Last publish

Collaborators

  • kamilkisiela