0.18.2 • Published 6 years ago

graphql-code-generator v0.18.2

Weekly downloads
52,193
License
MIT
Repository
github
Last release
6 years ago

graphql-codegen-cli

Refer to full documentation, examples and more here

This package is the front-facing package of the code generator.

It parses the CLI commands into a GeneratorConfig and Settings object, and also in charge of reading and writing files from the filesystem, and execute Introspection request to remote GraphQL endpoints.

For a full CLI documentation, please refer to the main README file of the package.

gql-gen.json

gql-gen.json is a local config file, provides a custom config when using custom templates.

This is an example for a valid file:

{
  "flattenTypes": true,
  "primitives": {
    "String": "string",
    "Int": "number",
    "Float": "number",
    "Boolean": "boolean",
    "ID": "string"
  },
  "customHelpers": {
    "myHelper": "./my-helper.js"
  }
}

You can override the config for flattenTypes and primitives (refer to graphql-codegen-compiler package README for more info).

You can also specify JavaScript files for customHelpers when generating custom templates (the custom files should export a Function as default).

Generator Specific Config

You can also pass configuration object to the output generator, by adding generatorConfig to the gql-gen.json file:

{
  "generatorConfig": {
    "myConfig": "my value"
  },
  "flattenTypes": true,
  "primitives": {
    "String": "string",
    "Int": "number",
    "Float": "number",
    "Boolean": "boolean",
    "ID": "string"
  }
}
0.18.2

6 years ago

0.18.1

6 years ago

0.18.1-alpha.16

6 years ago

0.18.1-alpha.6

6 years ago

0.18.0

6 years ago

0.17.0

6 years ago

0.16.1

6 years ago

0.16.0

6 years ago

0.15.2

6 years ago

0.15.1

6 years ago

0.15.0

6 years ago

0.14.5

6 years ago

0.14.4

6 years ago

0.14.3

6 years ago

0.14.2

6 years ago

0.14.1

6 years ago

0.14.0

6 years ago

0.13.0

6 years ago

0.12.6

6 years ago

0.12.5

6 years ago

0.12.4

6 years ago

0.12.3

6 years ago

0.12.2

6 years ago

0.12.1

6 years ago

0.12.0

6 years ago

0.11.0

6 years ago

0.11.0-alpha.0

6 years ago

0.10.7

6 years ago

0.10.6

6 years ago

0.10.5

6 years ago

0.10.4

6 years ago

0.10.3

6 years ago

0.10.2

6 years ago

0.10.1

6 years ago

0.10.0

6 years ago

0.9.4

6 years ago

0.9.3

7 years ago

0.9.2

7 years ago

0.9.1

7 years ago

0.9.0

7 years ago

0.8.21

7 years ago

0.8.20

7 years ago

0.8.19

7 years ago

0.8.18

7 years ago

0.8.17

7 years ago

0.8.16

7 years ago

0.8.15

7 years ago

0.8.14

7 years ago

0.8.13

7 years ago

0.8.12

7 years ago

0.8.11

7 years ago

0.8.10

7 years ago

0.8.9

7 years ago

0.8.8

7 years ago

0.8.7

7 years ago

0.8.6

7 years ago

0.8.5

7 years ago

0.8.4

7 years ago

0.8.3

7 years ago

0.8.2

7 years ago

0.8.1

7 years ago

0.8.0

7 years ago

0.6.0

7 years ago

0.5.5

7 years ago

0.5.4

8 years ago

0.5.2

8 years ago

0.5.1

8 years ago

0.5.0

8 years ago

0.4.0

8 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.5

8 years ago

0.2.4

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.9

8 years ago

0.1.8

8 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.1

8 years ago