Socket
Socket
Sign inDemoInstall

@graphql-inspector/core

Package Overview
Dependencies
4
Maintainers
3
Versions
411
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @graphql-inspector/core

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


Version published
Weekly downloads
283K
decreased by-0.91%
Maintainers
3
Created
Weekly downloads
 

Readme

Source

GraphQL Inspector

CircleCI npm version

GraphQL Inspector outputs 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 programmatic API, so you can use it however you want to and even build tools on top of it.

Installation

pnpm 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

Keywords

FAQs

Last updated on 07 May 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc