GitXplorerGitXplorer
n

gql2ts

public
0 stars
39 forks
0 issues

Commits

List of commits on branch master.
Unverified
a94a7a8837f832a102259fee870805f6cc2d2bef

add package.json

committed 9 years ago
Unverified
e75882fb02b65ffa85f778e840930ea60369a58d

gql :arrow_right: ts

committed 9 years ago

README

The README file for this repository.

GQL2TS

npm install -g gql2ts
Usage: index [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
  -m --module-name [moduleName]      name for the export module, 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 -m Avant -i BadInterface,BadType,BadUnion -o avant-gql.d.ts schema.json

Todo

  • [ ] Make an interface for a response from GraphQL, something like:

    interface IGraphQLResponse {
      data: IQuery | IMutation;
      errors: Array<IGraphQLError>;
    }
  • [ ] Add a comprehensive test suite