$ npm install @graphql-inspector/core
GraphQL Inspector ouputs a list of changes between two GraphQL schemas. Every change is precisely explained and marked as breaking, non-breaking or dangerous. It helps you validate documents and fragments against a schema and even find similar or duplicated types.
Major features:
GraphQL Inspector has a CLI and also a programatic API, so you can use it however you want to and even build tools on top of it.
yarn add @graphql-inspector/core
import {
diff,
validate,
similar,
coverage,
Change,
InvalidDocument,
SimilarMap,
SchemaCoverage,
} from '@graphql-inspector/core';
// diff
const changes: Change[] = diff(schemaA, schemaB);
// validate
const invalid: InvalidDocument[] = validate(documentsGlob, schema);
// similar
const similar: SimilarMap = similar(schema, typename, threshold);
// coverage
const schemaCoverage: SchemaCoverage = coverage(schema, documents);
// ...
MIT © Kamil Kisiela
© 2010 - cnpmjs.org x YWFE | Home | YWFE