Converts GraphQL Schema Language (SDL) to JSON Schema (draft-04). Stable version 0.1.2, low release cadence. Differentiates by enabling reuse of GraphQL type definitions in JSON Schema contexts; outputs definitions with GraphQL-specific constructs (e.g., GRAPHQL_SCALAR, GRAPHQL_UNION) rather than fully standard JSON Schema, which may require post-processing.
npm install graphql-json-schemaNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic usage: convert GraphQL SDL string to JSON Schema object and print it.
Post-process the output to replace custom types with standard ones, or use a tool that understands these extensions.
Use a validator that supports draft-04, or convert the output to a later draft.
Define explicit mapping for custom scalars if needed after conversion.
Consider alternative libraries like graphql-2-json-schema or graphql-schema-to-json-schema.
Run 'npm install graphql-json-schema' and ensure import statement matches CommonJS or ESM pattern.
Use default import: import transform from 'graphql-json-schema' or const transform = require('graphql-json-schema').Use a valid JSON Schema draft-04 validator, or remove the $schema property from output.
No dependency data recorded yet.