GraphQL Schema Diff is a CLI and library for comparing two GraphQL schemas and detecting dangerous and breaking changes. v3.0.0 (current stable) requires Node 20+, ships TypeScript types, and offers both CLI and JavaScript/TypeScript API. Key differentiators: focused solely on diffing with clear human-readable output, support for remote schema URLs, glob patterns, and HTML output. Unlike GraphQL Inspector which lists all changes, it prioritizes breaking and dangerous detection with exit code configuration.
npm install graphql-schema-diffNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Compares a remote GraphQL schema URL with a local .graphql file and prints diff with dangerous and breaking changes.
Use import statements and ensure Node >=20.
Pass --input-value-deprecation if you need deprecated input values included.
Use npx graphql-schema-diff instead of global install.
Use absolute paths or resolve with path.resolve(__dirname, ...) in API.
Pass headers as ['Authorization', 'Bearer token'].
Always check if result is falsy before accessing properties.
Switch to ES module imports and ensure package.json has "type": "module" or use .mjs extension.
Check if result is truthy before destructuring: const result = await getDiff(...); if (result) { const { diff } = result; }Install graphql-request: npm install graphql-request
No dependency data recorded yet.