sqs / gql2ts

convert a graphql schema to a typescript definition

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GQL2TS

Build Status

npm install -g gql2ts
Usage: gql2ts [options] <schema.json>

Options:

  -h, --help                         output usage information
  -V, --version                      output the version number
  -o --output-file [outputFile]      name for ouput file, defaults to graphqlInterfaces.d.ts
  -n --namespace [namespace]         name for the namespace, defaults to "GQL"
  -i --ignored-types <ignoredTypes>  names of types to ignore (comma delimited)

Examples

With Default Options

gql2ts schema.json

With Optional Options

gql2ts -n Avant -i BadInterface,BadType,BadUnion -o avant-gql.d.ts schema.json

About

convert a graphql schema to a typescript definition


Languages

Language:JavaScript 100.0%