@nanolier/typescript-graphql-schema-type-generator

0.0.6Β β€’Β PublicΒ β€’Β Published

Typescript Graphql Schema Type Generator

🐈 CLI tool to create Type Alias for TypeScript from GraphQL schema

Getting Started

Install

Install the library.

npm i -D @nanolier/typescript-graphql-schema-type-generator

Add to scripts in package.json.

{
  "scripts": {
    "tgstgen": "tgstgen"
  }
}

Create Type Alias File

npm run tgstgen

By default, "./schema.graphql" is read and "./src/__generated__/schema.graphql.ts". To change this, specify the file to be read and the output destination as arguments when executing the command.

npm run tgstgen .example-dir/schema.gql ./example-dir/__generated__/schema.graphql.ts

or

{
  "scripts": {
    "tgstgen": "tgstgen .example-dir/schema.gql ./example-dir/__generated__/schema.graphql.ts"
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @nanolier/typescript-graphql-schema-type-generator

Weekly Downloads

100

Version

0.0.6

License

ISC

Unpacked Size

23 kB

Total Files

6

Last publish

Collaborators

  • nanolier