1.0.0 • Published 4 years ago

jsondir2graphql v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

jsondir2graphql

Generate graphql type definitions from a directory of json files using @walmartlabs/json-to-simple-graphql-schema

Usage

npx jsondir2graphql test/fixtures/ test/schema/schema.graphql

Example

Input

foo.json

{
    "foo": "1"
}

bar.json

{
    "bar": "1"
}

Output

type Foo {
  foo: String
}
type Bar {
  bar: String
}

Notes

Requires Node 14 for top level await and ES modules.