Registry / devops / graphql-introspection-json-to-sdl

graphql-introspection-json-to-sdl

JSON →
library1.0.3jsnpmunverified

CLI tool that converts a GraphQL schema introspection JSON file into SDL (Schema Definition Language) format. Version 1.0.3 is stable, with no regular release cadence. Differentiator: simple, focused CLI utility with no dependencies, unlike alternatives like graphql-cli or custom scripts.

npm install graphql-introspection-json-to-sdl
INSTALL
IMPORT
SIG · GRAPHQL-INTROSPECT
G
graphql-introspection-json-to-sdl
devopsjavascriptv1.0.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

graphql-introspection-json-to-sdl
npx graphql-introspection-json-to-sdl schema.json > schema.graphql
graphql-introspection-json-to-sdl schema.json
This is a CLI tool, not a library. Use npx or install globally.

Convert an introspection JSON file to SDL and write to a .graphql file.

npx graphql-introspection-json-to-sdl schema.json > schema.graphql
Debug
Known issues
gotchaThe output is written to stdout; you must redirect to a file or use the output.
fix
Use shell redirection: graphql-introspection-json-to-sdl schema.json > schema.graphql
affects: >=1.0.0
gotchaThe input JSON must be a valid introspection query result (e.g., from graphql(IntrospectionQuery)).
fix
Ensure the JSON file contains the full introspection result, not just the data part.
affects: >=1.0.0
deprecatedThe package does not support the newer @link directives or federation introspection. SDL output may be incomplete for modern schemas.
fix
For federated schemas, consider using @apollo/federation-introspection or graphql-inspector.
affects: <2.0.0
Errors
Common errors & fixes
Error: Cannot find module 'graphql-introspection-json-to-sdl'
Package not installed globally or locally.
fix
Run 'npm install -g graphql-introspection-json-to-sdl' or use npx.
Error: ENOENT: no such file or directory, open 'schema.json'
The input file path is incorrect or file missing.
fix
Provide the correct path to the introspection JSON file.
Upgrade
Version history
1.0.3latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
graphql-introspection-json-to-sdl — npm install graphql-introspection-json-to-sdl · libregistry