The Guild LogoThe Guild Monogram
Docs

GraphQL Code Generator

Generate anything from GraphQL schema / operations!

Contact Us

config field#

The config field is used to pass configuration to Plugins.

config can be specified at many levels of the configuration:

Root Level#

If you specify it in your root level, the options will be passed to every plugin for each output file:

schema: schema.graphql config: configKey: configValue generates: output.ts: - plugin1 - plugin2

Output Level#

If you specify it at the output file level, every plugin for specific output will get the config value:

schema: schema.graphql generates: output.ts: config: configKey: configValue plugins: - plugin1 - plugin2

Output level configuration overrides root-level configuration.

Plugin Level#

If you specify it at the plugin level, only that plugin will get the config value:

schema: schema.graphql generates: output.ts: - plugin1: configKey: configValue - plugin2: configKey: otherValue

Plugin level configuration overrides output-level and root-level configuration.