Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@graphql-inspector/commands

Package Overview
Dependencies
Maintainers
1
Versions
418
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-inspector/commands

Plugin system for commands in GraphQL Inspector

  • 0.0.0-canary.6527017
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
166K
increased by3.96%
Maintainers
1
Weekly downloads
 
Created

What is @graphql-inspector/commands?

@graphql-inspector/commands is a toolset for inspecting, validating, and comparing GraphQL schemas. It helps developers ensure the integrity and compatibility of their GraphQL APIs by providing various commands to check for changes, validate schemas, and more.

What are @graphql-inspector/commands's main functionalities?

Schema Diff

The `diff` command allows you to compare two GraphQL schemas and identify the differences between them. This is useful for understanding what has changed between schema versions.

const { diff } = require('@graphql-inspector/commands');

const oldSchema = `type Query { hello: String }`;
const newSchema = `type Query { hello: String, goodbye: String }`;

const result = diff(oldSchema, newSchema);
console.log(result);

Schema Validation

The `validate` command checks a GraphQL schema for errors and inconsistencies. This helps ensure that the schema is correctly defined and adheres to GraphQL specifications.

const { validate } = require('@graphql-inspector/commands');

const schema = `type Query { hello: String }`;
const result = validate(schema);
console.log(result);

Schema Coverage

The `coverage` command analyzes how well your GraphQL queries cover your schema. This helps identify parts of the schema that are not being used or tested.

const { coverage } = require('@graphql-inspector/commands');

const schema = `type Query { hello: String }`;
const documents = [{ query: `{ hello }` }];

const result = coverage(schema, documents);
console.log(result);

Other packages similar to @graphql-inspector/commands

Keywords

FAQs

Package last updated on 26 May 2020

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc