0.5.0 • Published 3 years ago

graphql-json-to-sdl v0.5.0

Weekly downloads
258
License
MIT
Repository
github
Last release
3 years ago

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
0.5.0

3 years ago

0.4.1

3 years ago

0.3.0

3 years ago

0.2.4-beta.1

3 years ago

0.2.4-beta.0

3 years ago

0.2.4

3 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago