A command line utility for converting a JSON GraphQL schema to GraphQL SDL (Schema Definition Language). Current version 0.5.0, released with low frequency (last release in 2020). Key differentiator: it sorts fields from the JSON schema before writing the SDL, ensuring consistent output even with nondeterministic field order from code-first libraries. Useful for tooling that requires a .graphql file when only a JSON schema is available. Ships TypeScript types.
npm install graphql-json-to-sdlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Reads a JSON GraphQL schema from a file, converts it to SDL string, and writes it to another file.
Consider using graphql-js's printSchema or other actively maintained alternatives.
Ensure your JSON schema follows the GraphQL introspection result format (with __schema key).
Upgrade to v0.5.0 or use @types/graphql-json-to-sdl if available.
Run 'npm install graphql-json-to-sdl' or 'yarn add graphql-json-to-sdl'.
Use 'import { graphqlJsonToSdl } from "graphql-json-to-sdl"'.Verify the source file exists and contains valid JSON GraphQL schema.
No dependency data recorded yet.