simple-graphql-to-typescript
Simple Typescript interface generator from GraphQL Schemas
Last updated 3 months ago by desnoth .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install simple-graphql-to-typescript 
SYNC missed versions from official npm registry.

Simple-graphql-to-typescript generator

sgts logo

npm version npm downloads npm downloads

Usage

Refer to the full documentation !

Installation

For global use

npm i -g simple-graphql-to-typescript
#or
yarn global add simple-graphql-to-typescript

For local use

npm i simple-graphql-to-typescript --save-dev
#or
yarn add -D simple-graphql-to-typescript

Help

sgts -h

Documentation

Option Short syntax Type Usage
--endpoint <endpoint> -e string(url) See doc
--json <path to json> -j string(path) See doc
--output <path> -o string(path)
default ./generated.ts
See doc
--codegen-methods boolean See doc
--codegen-react-hooks boolean See doc
--codegen-vue-hooks boolean See doc
--codegen-templates boolean See doc
--customScalars <scalars> {"myScalar": "MyType"} See doc
--prefix <prefix> -p string
default null
See doc
--suffix <suffix> -s string
default null
See doc
--header <header> string
default null
See doc
--compileToJs boolean See doc
--download -D string
default null
See doc
generate string
default development
See doc
init See doc

Roadmap

I don't have much free time to develop feature I don't use, but feel free to send a PR!

  • [x] Export only Gql string
  • [x] Removed Query and mutation name in Apollo Hooks data
  • [x] Config file .sgtsrc.js
  • [x] Support Subscriptions for codegen-react-hooks
  • [x] Support Subscriptions for codegen-vue-hooks
  • [x] Support Subscriptions for codegen-template
  • [ ] Support Subscriptions for codegen-methods
  • [ ] Support UseLazyQuery Apollo Hook
  • [ ] Highlight new generated, modified or deleted types in terminal

License

MIT

Victor Garcia

Current Tags

  • 0.6.9                                ...           latest (3 months ago)

111 Versions

  • 0.6.9                                ...           3 months ago
  • 0.6.8                                ...           3 months ago
  • 0.6.7                                ...           3 months ago
  • 0.6.6                                ...           3 months ago
  • 0.6.5                                ...           3 months ago
  • 0.6.3                                ...           3 months ago
  • 0.6.2                                ...           3 months ago
  • 0.6.1                                ...           3 months ago
  • 0.6.0                                ...           4 months ago
  • 0.5.2                                ...           4 months ago
  • 0.5.1                                ...           4 months ago
  • 0.5.0                                ...           4 months ago
  • 0.4.9                                ...           4 months ago
  • 0.4.8                                ...           4 months ago
  • 0.4.7                                ...           4 months ago
  • 0.4.6                                ...           4 months ago
  • 0.4.5                                ...           4 months ago
  • 0.4.4                                ...           4 months ago
  • 0.4.3                                ...           4 months ago
  • 0.4.2                                ...           4 months ago
  • 0.4.1                                ...           4 months ago
  • 0.4.0                                ...           4 months ago
  • 0.3.37                                ...           4 months ago
  • 0.3.36                                ...           4 months ago
  • 0.3.35                                ...           4 months ago
  • 0.3.34                                ...           4 months ago
  • 0.3.33                                ...           5 months ago
  • 0.3.32                                ...           6 months ago
  • 0.3.31                                ...           6 months ago
  • 0.3.3                                ...           6 months ago
  • 0.3.2                                ...           6 months ago
  • 0.3.1                                ...           6 months ago
  • 0.3.0                                ...           7 months ago
  • 0.2.53                                ...           7 months ago
  • 0.2.52                                ...           7 months ago
  • 0.2.51                                ...           7 months ago
  • 0.2.5                                ...           7 months ago
  • 0.2.4                                ...           7 months ago
  • 0.2.31                                ...           7 months ago
  • 0.2.3                                ...           7 months ago
  • 0.2.12                                ...           7 months ago
  • 0.2.1                                ...           7 months ago
  • 0.2.0                                ...           7 months ago
  • 0.1.94                                ...           8 months ago
  • 0.1.93                                ...           8 months ago
  • 0.1.92                                ...           8 months ago
  • 0.1.91                                ...           8 months ago
  • 0.1.9                                ...           8 months ago
  • 0.1.82                                ...           8 months ago
  • 0.1.81                                ...           8 months ago
  • 0.1.8                                ...           8 months ago
  • 0.1.72                                ...           8 months ago
  • 0.1.71                                ...           8 months ago
  • 0.1.7                                ...           8 months ago
  • 0.1.66                                ...           8 months ago
  • 0.1.65                                ...           8 months ago
  • 0.1.64                                ...           8 months ago
  • 0.1.63                                ...           8 months ago
  • 0.1.62                                ...           8 months ago
  • 0.1.61                                ...           8 months ago
  • 0.1.6                                ...           8 months ago
  • 0.1.52                                ...           8 months ago
  • 0.1.51                                ...           8 months ago
  • 0.1.5                                ...           8 months ago
  • 0.1.41                                ...           10 months ago
  • 0.1.4                                ...           10 months ago
  • 0.1.39                                ...           10 months ago
  • 0.1.38                                ...           10 months ago
  • 0.1.37                                ...           10 months ago
  • 0.1.36                                ...           10 months ago
  • 0.1.35                                ...           10 months ago
  • 0.1.3                                ...           10 months ago
  • 0.1.2                                ...           10 months ago
  • 0.1.1                                ...           10 months ago
  • 0.1.0                                ...           10 months ago
  • 0.0.67                                ...           a year ago
  • 0.0.66                                ...           a year ago
  • 0.0.651                                ...           a year ago
  • 0.0.65                                ...           a year ago
  • 0.0.64                                ...           a year ago
  • 0.0.63                                ...           a year ago
  • 0.0.62                                ...           a year ago
  • 0.0.612                                ...           a year ago
  • 0.0.611                                ...           a year ago
  • 0.0.61                                ...           a year ago
  • 0.0.6                                ...           a year ago
  • 0.0.511                                ...           a year ago
  • 0.0.51                                ...           a year ago
  • 0.0.5                                ...           a year ago
  • 0.0.45                                ...           a year ago
  • 0.0.44                                ...           a year ago
  • 0.0.433                                ...           a year ago
  • 0.0.432                                ...           a year ago
  • 0.0.431                                ...           a year ago
  • 0.0.43                                ...           a year ago
  • 0.0.423                                ...           a year ago
  • 0.0.422                                ...           a year ago
  • 0.0.421                                ...           a year ago
  • 0.0.42                                ...           a year ago
  • 0.0.41                                ...           a year ago
  • 0.0.4                                ...           a year ago
  • 0.0.351                                ...           a year ago
  • 0.0.35                                ...           a year ago
  • 0.0.33                                ...           a year ago
  • 0.0.32                                ...           a year ago
  • 0.0.31                                ...           a year ago
  • 0.0.23                                ...           a year ago
  • 0.0.22                                ...           a year ago
  • 0.0.21                                ...           a year ago
  • 0.0.2                                ...           a year ago
  • 0.0.1                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 111
Last Day 0
Last Week 0
Last Month 111
Dependencies (13)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |