Socket
Book a DemoInstallSign in
Socket

graphql-json-to-sdl

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-json-to-sdl

A command line utility for converting a JSON GraphQL schema to GraphQL SDL.

0.5.0
latest
Source
npmnpm
Version published
Weekly downloads
626
-7.26%
Maintainers
1
Weekly downloads
 
Created
Source

graphql-json-to-sdl

Version Codecov Downloads/week License

A command line utility for converting a JSON GraphQL schema to GraphQL SDL.

This is useful when you only have a JSON GraphQL schema (e.g. from a code-first GraphQL library that can only produce schemas as .json files) but you need an SDL schema (i.e. .graphql file) for other tooling.

Fields from the JSON schema are sorted before writing the SDL file. This allows for consistent SDL output even when using a GraphQL library that produces JSON schemas with nondeterministic field order.

Usage

$ graphql-json-to-sdl SRC OUT

Arguments:

  • SRC: The JSON GraphQL schema to convert
  • OUT: The output file

Options:

  • -h, --help: show CLI help
  • -v, --version: show CLI version

Example:

$ graphql-json-to-sdl ./schema.json ./schema.graphql

Developing

Install dependencies with:

$ yarn install

To run tests:

$ yarn test

You can also run the CLI in dev mode. For example:

$ ./bin/run --help

Keywords

graphql

FAQs

Package last updated on 06 Jan 2023

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.