Generate TypeScript type definitions from an introspectable GraphQL server URL.
$ graphql-url-to-typescript --help
Usage: graphql-url-to-typescript [options] <url> [header]
Generate TypeScript type definitions from an introspectable GraphQL server url.
Options:
-V, --version output the version number
-o, --output-file <path> output file for generated type definitions, by default redirects to stdout
-a, --no-field-arguments remove the special property `$__arguments`
-t, --no-field-types remove the special properties `$__objects` and `$__scalars`
-h, --help output usage information
Example:
graphql-url-to-typescript -o ./github.d.ts https://api.github.com/graphql 'Authorization:Bearer <your GitHub personal access token>'
Notes:
`$__arguments` contains the type definitions of field arguments
`$__scalars` gathers the scalar properties of an interface
`$__objects` gathers the object properties of an interface