JSPM

@graphql-inspector/core

1.30.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1204699
  • Score
    100M100P100Q199393F
  • License MIT

Tooling for GraphQL. Compare GraphQL Schemas, check documents, find breaking changes, find similar types.

Package Exports

  • @graphql-inspector/core

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@graphql-inspector/core) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

GraphQL Inspector

CircleCI npm version

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.

Features

Major features:

  • Compares schemas
  • Finds breaking or dangerous changes
  • Validates documents against a schema
  • Finds similar / duplicated types
  • Schema coverage based on documents
  • Serves a GraphQL server with faked data and GraphQL Playground

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.

Installation

yarn add @graphql-inspector/core

Examples

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);
// ...

License

MIT © Kamil Kisiela