GitXplorerGitXplorer
n

gql2ts

public
0 stars
39 forks
0 issues

Commits

List of commits on branch master.
Unverified
860e1af5e2f862fc8c3765d35c6d94e2535fc879

Fix bugs

nnmn committed 9 years ago
Unverified
a36fbaa00b89243e28a2714673da8207866feb07

add use strict to enable const/let

nnmn committed 9 years ago
Unverified
8231c25c5ee48a37f5a2c09eacaf34c7ac0e54a6

Add use strict to file

nnmn committed 9 years ago
Unverified
74c6ad3c87fb70a1013c44e2933afaf29e0e73fb

Merge pull request #1 from avantcredit/add_repo

bbrettjurgens committed 9 years ago
Unverified
31e810cf800d7fbb88e0a3a231645b185271e5fa

add repo

committed 9 years ago
Unverified
67c1426759b2f10d1e10bc0cc29a1b3f96cdaa80

update readme

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