GraphQL Code Generator
GraphQL Code Generator config file
| Type | Types.Config |
|---|---|
| File match |
codegen.yml
codegen.yaml
codegen.json
.codegen.yml
.codegen.yaml
.codegen.json
|
| Schema URL | https://catalog.lintel.tools/schemas/schemastore/graphql-code-generator/latest.json |
| Source | https://www.graphql-code-generator.com/config.schema.json |
Validate with Lintel
npx @lintel/lintel check
Definitions
Represents the root YAML schema for the config file.
Specify a Node module name, a custom file, or a function, to be used instead of a standard fetch.
Configuration object containing key => value that will be passed to the plugins. Specifying configuration in this level of your configuration file will pass it to all plugins, in all outputs.
The options may vary depends on what plugins you are using.
For more details: https://graphql-code-generator.com/docs/config-reference/config-field
A map where the key represents an output path for the generated code and the value represents a set of options which are relevant for that specific file.
For more details: https://graphql-code-generator.com/docs/config-reference/codegen-config
A flag to overwrite files if they already exist when generating code (true by default).
For more details: https://graphql-code-generator.com/docs/config-reference/codegen-config
A flag to trigger codegen when there are changes in the specified GraphQL schemas.
You can either specify a boolean to turn it on/off or specify an array of glob patterns to add custom files to the watch.
For more details: https://graphql-code-generator.com/docs/getting-started/development-workflow#watch-mode
A flag to suppress non-zero exit code when there are no documents to generate.
A flag to disable adding .js extension to the output file. Default: true.
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
A flag to suppress printing errors when they occur.
A flag to output more detailed information about tasks
A flag to output debug logs
A flag to print only errors.
Additional context passed to plugins
Allows you to override the configuration for @graphql-tools/graphql-tag-pluck, the tool that extracts your GraphQL operations from your code files.
For more details: https://graphql-code-generator.com/docs/config-reference/documents-field#graphql-tag-pluck
4 nested properties
Configures the magic GraphQL comments to look for. The default is GraphQL.
Overrides the name of the default GraphQL name identifier.
Allows to use a global identifier instead of a module import.
Alows to raise errors if any matched files are not valid GraphQL. Default: false.
If true, write to files whichever generates block succeeds. If false, one failed generates means no output is written to files. Default: false
configure the flutter-freezed plugin
Setting this option to true will camelCase enum values as required by Dart's recommended linter.
If set to false, the original casing as specified in the Graphql Schema is used
You can also transform the casing by specifying your preferred casing for Enum values.
Available options are: 'snake_case', 'camelCase' and 'PascalCase'
For consistency, this option applies the same configuration to all Enum Types in the GraphQL Schema Default value: "true"
The freezed library has this option enabled by default.
Use this option to enable/disable this option completely.
The plugin by default generates immutable Freezed models using the @freezed decorator.
If this option is configured, the plugin will generate immutable Freezed models using the @Freezed(copyWith: value) instead.
Setting a boolean value will enable/disable this option globally for every GraphQL Type
but you can also set this option to true for one or more GraphQL Types using a TypeNamePattern.
Default value: "undefined"
The key is the GraphQL Scalar Type and the value is the equivalent Dart Type
The plugin automatically handles built-in GraphQL Scalar Types so only specify the custom Scalars in your Graphql Schema. Default value: "[object Object]"
This will annotate the generated parameter with a @Default(value: defaultValue) decorator.
The default value will be interpolated into the @Default(value: ${value}) decorator so
Use backticks for the value element so that you can use quotation marks for string values.
E.g: "I'm a string default value" but Episode.jedi is not a string value.
Use the appliesOn to specify where this option should be applied on
Default value: "undefined"
Using a TypeNamePattern, you can mark an entire factory constructor for one or more GraphQL types as deprecated.
Likewise, using a FieldNamePattern, you can mark one or more fields as deprecated
Since the first element in the tuple has a type signature of Pattern,
you can use either TypeNamePattern or FieldNamePattern or use both
by composing them with Pattern.compose(...)
Use the appliesOn to specify which block this option should be applied on
Default value: "undefined"
The freezed library has this option enabled by default.
Use this option to enable/disable this option completely.
The plugin by default generates immutable Freezed models using the @freezed decorator.
If this option is configured, the plugin will generate immutable Freezed models using the @Freezed(equal: value) instead.
Setting a boolean value will enable/disable this option globally for every GraphQL Type
but you can also set this option to true for one or more GraphQL Types using a TypeNamePattern.
Default value: "undefined"
Wraps the fields names that are valid Dart keywords with the prefix and suffix given Default value: "true"
This will mark the specified parameters as final Default value: "undefined"
names of GraphQL types to ignore when generating Freezed classes Default value: "undefined"
The freezed library by default generates immutable models decorated with the @freezed decorator.
This option if set to false the plugin will generate mutable Freezed models using the @unfreezed decorator instead.
Setting a boolean value will enable/disable this option globally for every GraphQL Type
but you can also set this option to true for one or more GraphQL Types using a TypeNamePattern.
Default value: "undefined"
allows collections(lists/maps) to be modified even if class is immutable Default value: "undefined"
maps over the value(array of typeNames) and transform each as a named factory constructor inside a class generated for the key(target GraphQL Object Type). Default value: "undefined"
since inputs will be used to collect data, it makes sense to make them mutable with Freezed's @unfreezed decorator.
This overrides(in order words: has a higher precedence than) the immutable config value ONLY for GraphQL input types.
Default value: "true"
if true, defines a private empty constructor to allow getter and methods to work on the class Default value: "true"
customize the key to be used for fromJson with multiple constructors Default value: "undefined"
This plugin generates React-Query Hooks with TypeScript typings.
It extends the basic TypeScript plugins: @graphql-codegen/typescript, @graphql-codegen/typescript-operations - and thus shares a similar configuration.
If you are using the
react-querypackage instead of the@tanstack/react-querypackage in your project, please set thelegacyModeoption totrue.
Customize the fetcher you wish to use in the generated file. React-Query is agnostic to the data-fetching layer, so you should provide it, or use a custom one.
The following options are available to use:
- 'fetch' - requires you to specify endpoint and headers on each call, and uses
fetchto do the actual http call. { endpoint: string, fetchParams: RequestInit }: hardcode your endpoint and fetch options into the generated output, using the environmentfetchmethod. You can also useprocess.env.MY_VARas endpoint or header value.file#identifier- You can use custom fetcher method that should implement the exportedReactQueryFetcherinterface. Example:./my-fetcher#myCustomFetcher.graphql-request: Will generate each hook withclientargument, where you should pass your ownGraphQLClient(created fromgraphql-request).
For each generate query hook adds document field with a
corresponding GraphQL query. Useful for queryClient.fetchQuery.
Default value: "false"
For each generate query hook adds getKey(variables: QueryVariables) function. Useful for cache updates. If addInfiniteQuery is true, it will also add a getKey function to each infinite query. Default value: "false"
For each generate mutation hook adds getKey() function. Useful for call outside of functional component. Default value: "false"
For each generate query hook adds fetcher field with a corresponding GraphQL query using the fetcher.
It is useful for queryClient.fetchQuery and queryClient.prefetchQuery.
Default value: "false"
Changes the default "TError" generic type. Default value: "unknown"
Adds an Infinite Query along side the standard one Default value: "false"
If false, it will work with @tanstack/react-query, default value is true.
Default value: "true"
Adds a suffix to generated operation result type names Default value: ""
Set this configuration to true if you wish to make sure to remove duplicate operation name suffix.
Default value: "false"
Set this configuration to true if you wish to disable auto add suffix of operation name, like Query, Mutation, Subscription, Fragment.
Default value: "false"
Changes the GraphQL operations variables prefix. Default value: ""
Changes the GraphQL operations variables suffix. Default value: "Document"
Changes the GraphQL fragments variables prefix. Default value: ""
Changes the GraphQL fragments variables suffix. Default value: "FragmentDoc"
This config adds PURE magic comment to the static variables to enforce treeshaking for your bundler. Default value: "false"
If you are using documentNode: documentMode | documentNodeImportFragments, you can set this to true to apply document optimizations for your GraphQL document.
This will remove all "loc" and "description" fields from the compiled document, and will remove all empty arrays (such as directives, arguments and variableDefinitions).
Default value: "true"
If set to true, it will enable support for parsing variables on fragments. Default value: "false"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Removes fragment duplicates for reducing data transfer. It is done by removing sub-fragments imports from fragment definition Instead - all of them are imported to the Operation node. Default value: "false"
Define where to import the base api to inject endpoints into
Change the import name of the baseApi from default 'api' Default value: "'api'"
Whether to export React Hooks from the generated api. Enable only when using the "@reduxjs/toolkit/query/react" import of createApi
Default value: "false"
Sets the overrideExisting option, for example to allow for hot module reloading when running graphql-codegen in watch mode.
Will directly be injected as code.
Default value: "undefined"
Sets the addTransformResponse option, which will automatically add a types transformResponse for query
Default value: "false"
This plugin generate a generic SDK (without any Requester implemented), allow you to easily customize the way you fetch your data, without loosing the strongly-typed integration.
usingObservableFrom: import Observable from 'zen-observable'
OR
usingObservableFrom: import { Observable } from 'rxjs'
By default the request method return the data or errors key from the response. If you need to access the extensions key you can use the rawRequest method.
Default value: "false"
Customize from which module will gql be imported from.
This is useful if you want to use modules other than graphql-tag, e.g. graphql.macro.
Default value: "graphql-tag#gql"
Customize from which module will DocumentNode be imported from.
This is useful if you want to use modules other than graphql, e.g. @graphql-typed-document-node.
Default value: "graphql#DocumentNode"
Set this configuration to true if you wish to tell codegen to generate code with no export identifier.
Default value: "false"
Set this configuration to true if you wish to make sure to remove duplicate operation name suffix.
Default value: "false"
Set this configuration to true if you wish to disable auto add suffix of operation name, like Query, Mutation, Subscription, Fragment.
Default value: "false"
Adds a suffix to generated operation result type names Default value: ""
Changes the GraphQL operations variables prefix. Default value: ""
Changes the GraphQL operations variables suffix. Default value: "Document"
Changes the GraphQL fragments variables prefix. Default value: ""
Changes the GraphQL fragments variables suffix. Default value: "FragmentDoc"
If you are using documentMode: documentNode | documentNodeImportFragments, you can set this to true to apply document optimizations for your GraphQL document.
This will remove all "loc" and "description" fields from the compiled document, and will remove all empty arrays (such as directives, arguments and variableDefinitions).
Default value: "true"
This config is used internally by presets, but you can use it manually to tell codegen to prefix all base types that it's using.
This is useful if you wish to generate base types from typescript-operations plugin into a different file, and import it from there.
Default value: ""
This config should be used if documentMode is external. This has 2 usage:
- any string: This would be the path to import document nodes from. This can be used if we want to manually create the document nodes e.g. Use
graphql-tagin a separate file and export the generated document - 'near-operation-file': This is a special mode that is intended to be used with
near-operation-filepreset to import document nodes from those files. If these files are.graphqlfiles, we make use of webpack loader. Default value: ""
This config adds PURE magic comment to the static variables to enforce treeshaking for your bundler. Default value: "false"
If set to true, it will enable support for parsing variables on fragments. Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Remove optional sign from all keyFields fields.
Default value: "false"
Remove optional sign from all generated keys of the root TypePolicy. Default value: "false"
Allow you to choose where to add the content. Default value: "prepend"
The actual content you wish to add, either a string or array of strings. You can also specify a path to a local file and the content if it will be loaded by codegen.
Customize the Moment format of the output time. Default value: "YYYY-MM-DDTHH:mm:ssZ"
Customize the comment message Default value: "'Generated on'"
This plugin generates the base TypeScript types, based on your GraphQL schema.
The types generated by this plugin are simple, and refers to the exact structure of your schema, and it's used as the base types for other plugins (such as typescript-operations / typescript-resolvers)
This will cause the generator to avoid using TypeScript optionals (?) on types,
so the following definition: type A { myField: String } will output myField: Maybe<string>
instead of myField?: Maybe<string>.
Default value: "false"
Will prefix every generated enum with const, you can read more about const enums here: https://www.typescriptlang.org/docs/handbook/enums.html.
Default value: "false"
Generates enum as TypeScript string union type instead of an enum. Useful if you wish to generate .d.ts declaration file instead of .ts, or if you want to avoid using TypeScript enums due to bundle size concerns
Default value: "false"
Controls whether to preserve typescript enum values as numbers Default value: "false"
This option controls whether or not a catch-all entry is added to enum type definitions for values that may be added in the future.
This is useful if you are using relay.
Default value: "false"
This option controls whether or not a catch-all entry is added to union type definitions for values that may be added in the future.
This is useful if you are using relay.
Default value: "false"
Generates enum as TypeScript const assertions instead of enum. This can even be used to enable enum-like patterns in plain JavaScript code if you choose not to use TypeScript’s enum construct.
Default value: "false"
This will cause the generator to emit types for enums only. Default value: "false"
This will cause the generator to emit types for operations only (basically only enums and scalars).
Interacts well with preResolveTypes: true
Default value: "false"
Generates immutable types by adding readonly to properties and uses ReadonlyArray.
Default value: "false"
Allow to override the type value of Maybe.
Default value: "T | null"
Allow to override the type value of Maybe for input types and arguments.
This is useful in case you want to differentiate between the wrapper of input and output types.
By default, this type just refers to Maybe type, but you can override its definition.
Default value: "Maybe
Set to true in order to generate output without export modifier.
This is useful if you are generating .d.ts file and want it to be globally available.
Default value: "false"
Set the value to true in order to disable all description generation.
Default value: "false"
When a GraphQL interface is used for a field, this flag will use the implementing types, instead of the interface itself. Default value: "false"
Set to true in order to wrap field definitions with EntireFieldWrapper.
This is useful to allow return types such as Promises and functions for fields.
Differs from wrapFieldDefinitions in that this wraps the entire field definition if i.e. the field is an Array, while
wrapFieldDefinitions will wrap every single value inside the array.
Default value: "false"
Allow to override the type value of EntireFieldWrapper. This wrapper applies outside of Array and Maybe
unlike fieldWrapperValue, that will wrap the inner type.
Default value: "T | Promise
Allow using enum string values directly.
Adds _ to generated Args types in order to avoid duplicate identifiers.
A raw configuration for enumValues map - can be represented with a single string value for a file path, a map between enum name and a file path, or a map between enum name and an object with explicit enum values.
Overrides the default output for various GraphQL elements.
Allow you to disable prefixing for generated enums, works in combination with typesPrefix.
Default value: "true"
Allow you to disable suffixing for generated enums, works in combination with typesSuffix.
Default value: "true"
Allow you to add wrapper for field type, use T as the generic value. Make sure to set wrapFieldDefinitions to true in order to make this flag work.
Default value: "T"
Set to true in order to wrap field definitions with FieldWrapper.
This is useful to allow return types such as Promises and functions.
Default value: "false"
This will cause the generator to ignore enum values defined in GraphQLSchema Default value: "false"
Adds a suffix to the imported names to prevent name clashes.
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin generates TypeScript types based on your GraphQLSchema and your GraphQL operations and fragments. It generates types for your GraphQL documents: Query, Mutation, Subscription and Fragment.
Note: In most configurations, this plugin requires you to use `typescript as well, because it depends on its base types.
The GraphQL spec
allows arrays and a single primitive value for list input. This allows to
deactivate that behavior to only accept arrays instead of single values. If
set to false, the definition: query foo(bar: [Int!]!): Foo will output
bar: Array<Int> instead of bar: Array<Int> | Int for the variable part.
Default value: "true"
This will cause the generator to avoid using TypeScript optionals (?) on types,
so the following definition: type A { myField: String } will output myField: Maybe<string>
instead of myField?: Maybe<string>.
Default value: "false"
Generates immutable types by adding readonly to properties and uses ReadonlyArray.
Default value: "false"
Flatten fragment spread and inline fragments into a simple selection set before generating. Default value: "false"
Include all fragments types when flattenGeneratedTypes is enabled. Default value: "false"
Set to true in order to generate output without export modifier.
This is useful if you are generating .d.ts file and want it to be globally available.
Default value: "false"
Add const export of the operation name to output file. Pay attention that the file should be d.ts.
You can combine it with near-operation-file preset and therefore the types will be generated along with graphql file. Then you need to set extension in presetConfig to be .gql.d.ts and by that you can import gql file in ts files.
It will allow you to get everything with one import:
import { GetClient, GetClientQuery, GetClientQueryVariables } from './GetClient.gql.js'
Default value: "false"
Allow to override the type value of Maybe.
Default value: "T | null"
Adds undefined as a possible type for query variables Default value: "false"
Options related to handling nullability
1 nested properties
Uses primitive types where possible.
Set to false in order to use Pick and take use the types generated by typescript plugin.
Default value: "true"
Avoid adding __typename for root types. This is ignored when a selection explicitly specifies __typename.
Default value: "false"
Adds a suffix to generated operation result type names Default value: ""
Set this configuration to true if you wish to make sure to remove duplicate operation name suffix.
Default value: "false"
Set this configuration to true if you wish to disable auto add suffix of operation name, like Query, Mutation, Subscription, Fragment.
Default value: "false"
If set to true, it will export the sub-types created in order to make it easier to access fields declared under fragment spread. Default value: "false"
If set to true, it will enable support for parsing variables on fragments. Default value: "false"
If set to true, merge equal fragment interfaces. Default value: "false"
1 nested properties
Adds integration with Apollo Client's @unmask directive
when using Apollo Client's data masking feature. @unmask ensures fields
marked by @unmask are available in the type definition.
Default value: "false"
Adds _ to generated Args types in order to avoid duplicate identifiers.
A raw configuration for enumValues map - can be represented with a single string value for a file path, a map between enum name and a file path, or a map between enum name and an object with explicit enum values.
Overrides the default output for various GraphQL elements.
Allow you to disable prefixing for generated enums, works in combination with typesPrefix.
Default value: "true"
Allow you to disable suffixing for generated enums, works in combination with typesSuffix.
Default value: "true"
Allow you to add wrapper for field type, use T as the generic value. Make sure to set wrapFieldDefinitions to true in order to make this flag work.
Default value: "T"
Set to true in order to wrap field definitions with FieldWrapper.
This is useful to allow return types such as Promises and functions.
Default value: "false"
This will cause the generator to emit types for enums only Default value: "false"
This will cause the generator to emit types for operations only (basically only enums and scalars) Default value: "false"
This will cause the generator to ignore enum values defined in GraphQLSchema Default value: "false"
Set to true in order to wrap field definitions with EntireFieldWrapper.
This is useful to allow return types such as Promises and functions for fields.
Differs from wrapFieldDefinitions in that this wraps the entire field definition if i.e. the field is an Array, while
wrapFieldDefinitions will wrap every single value inside the array.
Default value: "true"
Allow to override the type value of EntireFieldWrapper. This wrapper applies outside of Array and Maybe
unlike fieldWrapperValue, that will wrap the inner type.
Default value: "T | Promise
Adds a suffix to the imported names to prevent name clashes.
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin generates C# class identifier for your schema types.
A raw configuration for enumValues map - can be represented with a single string value for a file path, a map between enum name and a file path, or a map between enum name and an object with explicit enum values.
Allow you to customize the namespace name. Default value: "GraphQLCodeGen"
Allow you to customize the parent class name. Default value: "Types"
Allow you to customize the list type Default value: "IEnumerable"
Emit C# 9.0+ records instead of classes Default value: "false"
Should JSON attributes be emitted for produced types and properties ot not Default value: "true"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin generates C# class based on your GraphQL operations.
Allow you to customize the namespace name. Default value: "GraphQLCodeGen"
Defined the global value of namedClient.
Allows to define a custom suffix for query operations. Default value: "GQL"
Allows to define a custom suffix for mutation operations. Default value: "GQL"
Allows to define a custom suffix for Subscription operations. Default value: "GQL"
Allows to generate operation methods with class definitions for request/response parameters Default value: "false"
Customize from which module will gql be imported from.
This is useful if you want to use modules other than graphql-tag, e.g. graphql.macro.
Default value: "graphql-tag#gql"
Customize from which module will DocumentNode be imported from.
This is useful if you want to use modules other than graphql, e.g. @graphql-typed-document-node.
Default value: "graphql#DocumentNode"
Set this configuration to true if you wish to tell codegen to generate code with no export identifier.
Default value: "false"
Set this configuration to true if you wish to make sure to remove duplicate operation name suffix.
Default value: "false"
Set this configuration to true if you wish to disable auto add suffix of operation name, like Query, Mutation, Subscription, Fragment.
Default value: "false"
Adds a suffix to generated operation result type names Default value: ""
Changes the GraphQL operations variables prefix. Default value: ""
Changes the GraphQL operations variables suffix. Default value: "Document"
Changes the GraphQL fragments variables prefix. Default value: ""
Changes the GraphQL fragments variables suffix. Default value: "FragmentDoc"
If you are using documentMode: documentNode | documentNodeImportFragments, you can set this to true to apply document optimizations for your GraphQL document.
This will remove all "loc" and "description" fields from the compiled document, and will remove all empty arrays (such as directives, arguments and variableDefinitions).
Default value: "true"
This config is used internally by presets, but you can use it manually to tell codegen to prefix all base types that it's using.
This is useful if you wish to generate base types from typescript-operations plugin into a different file, and import it from there.
Default value: ""
This config should be used if documentMode is external. This has 2 usage:
- any string: This would be the path to import document nodes from. This can be used if we want to manually create the document nodes e.g. Use
graphql-tagin a separate file and export the generated document - 'near-operation-file': This is a special mode that is intended to be used with
near-operation-filepreset to import document nodes from those files. If these files are.graphqlfiles, we make use of webpack loader. Default value: ""
This config adds PURE magic comment to the static variables to enforce treeshaking for your bundler. Default value: "false"
If set to true, it will enable support for parsing variables on fragments. Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin prints the merged schema as string. If multiple schemas are provided, they will be merged and printed as one schema.
Include directives to Schema output. Default value: "false"
Include introspection types to Schema output. Default value: "false"
Set to true in order to print description as comments (using # instead of """)
Default value: "false"
Set to false to disable sorting Default value: "true"
Specifies the objects that will have TypeGraphQL decorators prepended to them, by name. Non-matching types will still be output, but without decorators. If not set, all types will be decorated.
This will cause the generator to avoid using TypeScript optionals (?) on types,
so the following definition: type A { myField: String } will output myField: Maybe<string>
instead of myField?: Maybe<string>.
Default value: "false"
Will prefix every generated enum with const, you can read more about const enums here: https://www.typescriptlang.org/docs/handbook/enums.html.
Default value: "false"
Generates enum as TypeScript string union type instead of an enum. Useful if you wish to generate .d.ts declaration file instead of .ts, or if you want to avoid using TypeScript enums due to bundle size concerns
Default value: "false"
Controls whether to preserve typescript enum values as numbers Default value: "false"
This option controls whether or not a catch-all entry is added to enum type definitions for values that may be added in the future.
This is useful if you are using relay.
Default value: "false"
This option controls whether or not a catch-all entry is added to union type definitions for values that may be added in the future.
This is useful if you are using relay.
Default value: "false"
Generates enum as TypeScript const assertions instead of enum. This can even be used to enable enum-like patterns in plain JavaScript code if you choose not to use TypeScript’s enum construct.
Default value: "false"
This will cause the generator to emit types for enums only. Default value: "false"
This will cause the generator to emit types for operations only (basically only enums and scalars).
Interacts well with preResolveTypes: true
Default value: "false"
Generates immutable types by adding readonly to properties and uses ReadonlyArray.
Default value: "false"
Allow to override the type value of Maybe.
Default value: "T | null"
Allow to override the type value of Maybe for input types and arguments.
This is useful in case you want to differentiate between the wrapper of input and output types.
By default, this type just refers to Maybe type, but you can override its definition.
Default value: "Maybe
Set to true in order to generate output without export modifier.
This is useful if you are generating .d.ts file and want it to be globally available.
Default value: "false"
Set the value to true in order to disable all description generation.
Default value: "false"
When a GraphQL interface is used for a field, this flag will use the implementing types, instead of the interface itself. Default value: "false"
Set to true in order to wrap field definitions with EntireFieldWrapper.
This is useful to allow return types such as Promises and functions for fields.
Differs from wrapFieldDefinitions in that this wraps the entire field definition if i.e. the field is an Array, while
wrapFieldDefinitions will wrap every single value inside the array.
Default value: "false"
Allow to override the type value of EntireFieldWrapper. This wrapper applies outside of Array and Maybe
unlike fieldWrapperValue, that will wrap the inner type.
Default value: "T | Promise
Allow using enum string values directly.
Adds _ to generated Args types in order to avoid duplicate identifiers.
A raw configuration for enumValues map - can be represented with a single string value for a file path, a map between enum name and a file path, or a map between enum name and an object with explicit enum values.
Overrides the default output for various GraphQL elements.
Allow you to disable prefixing for generated enums, works in combination with typesPrefix.
Default value: "true"
Allow you to add wrapper for field type, use T as the generic value. Make sure to set wrapFieldDefinitions to true in order to make this flag work.
Default value: "T"
Set to true in order to wrap field definitions with FieldWrapper.
This is useful to allow return types such as Promises and functions.
Default value: "false"
This will cause the generator to ignore enum values defined in GraphQLSchema Default value: "false"
Adds a suffix to the imported names to prevent name clashes.
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Removes fragment duplicates for reducing data transfer. It is done by removing sub-fragments imports from fragment definition Instead - all of them are imported to the Operation node. Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
This plugin generates TypeScript typings for .graphql files containing GraphQL documents, which later on can be consumed using graphql-tag/loader or use string types if you will use the operations as raw strings, and get type-check and type-safety for your imports. This means that any time you import objects from .graphql files, your IDE will provide auto-complete.
This plugin also handles .graphql files containing multiple GraphQL documents, and name the imports according to the operation name.
âš Fragments are not generated with named imports, only as default imports, due to
graphql-tag/loaderbehavior.
Allows specifying a module definition path prefix to provide distinction between generated types. Default value: ""
By default, only the filename is being used to generate TS module declarations. Setting this to true will generate it with a full path based on the CWD.
Default value: "false"
By default, a wildcard is being added as prefix, you can change that to a custom prefix Default value: "*/"
By default, the named exports will have a type DocumentNode. Change this to "string" if you only use raw strings.
Default value: "DocumentNode"
Allow you to customize the name of the exported identifier Default value: "namedOperations"
Will generate a const string instead of regular string. Default value: "false"
Throws an error if a duplicate operation name is found. Default value: "false"
This plugin generates graphql-request ready-to-use SDK, which is fully-typed.
By default, the request method return the data or errors key from the response. If you need to access the extensions key you can use the rawRequest method.
Default value: "false"
Allows you to override the type for extensions when rawRequest is enabled.
Default value: "any"
Customize from which module will gql be imported from.
This is useful if you want to use modules other than graphql-tag, e.g. graphql.macro.
Default value: "graphql-tag#gql"
Customize from which module will DocumentNode be imported from.
This is useful if you want to use modules other than graphql, e.g. @graphql-typed-document-node.
Default value: "graphql#DocumentNode"
Set this configuration to true if you wish to tell codegen to generate code with no export identifier.
Default value: "false"
Set this configuration to true if you wish to make sure to remove duplicate operation name suffix.
Default value: "false"
Set this configuration to true if you wish to disable auto add suffix of operation name, like Query, Mutation, Subscription, Fragment.
Default value: "false"
Adds a suffix to generated operation result type names Default value: ""
Changes the GraphQL operations variables prefix. Default value: ""
Changes the GraphQL operations variables suffix. Default value: "Document"
Changes the GraphQL fragments variables prefix. Default value: ""
Changes the GraphQL fragments variables suffix. Default value: "FragmentDoc"
If you are using documentMode: documentNode | documentNodeImportFragments, you can set this to true to apply document optimizations for your GraphQL document.
This will remove all "loc" and "description" fields from the compiled document, and will remove all empty arrays (such as directives, arguments and variableDefinitions).
Default value: "true"
This config is used internally by presets, but you can use it manually to tell codegen to prefix all base types that it's using.
This is useful if you wish to generate base types from typescript-operations plugin into a different file, and import it from there.
Default value: ""
This config should be used if documentMode is external. This has 2 usage:
- any string: This would be the path to import document nodes from. This can be used if we want to manually create the document nodes e.g. Use
graphql-tagin a separate file and export the generated document - 'near-operation-file': This is a special mode that is intended to be used with
near-operation-filepreset to import document nodes from those files. If these files are.graphqlfiles, we make use of webpack loader. Default value: ""
This config adds PURE magic comment to the static variables to enforce treeshaking for your bundler. Default value: "false"
If set to true, it will enable support for parsing variables on fragments. Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
Customize the suffix for the generated GraphQL types.
Default value: "DbObject"
Customize the suffix for the generated GraphQL interfaces.
Default value: "DbObject"
Customize the type of _id fields. You can either specify a type name, or specify module#type.
Default value: "mongodb#ObjectId"
Customize the name of the id field generated after using @id directive over a GraphQL field.
Default value: "_id"
Replaces generated enum values with string.
Default value: "true"
This will cause the generator to avoid using TypeScript optionals (?),
so the following definition: type A { myField: String } will output myField: Maybe<string>
instead of myField?: Maybe<string>.
Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin generates TypeScript signature for resolve functions of your GraphQL API.
You can use this plugin to generate simple resolvers signature based on your GraphQL types, or you can change its behavior be providing custom model types (mappers).
You can find a blog post explaining the usage of this plugin here: https://the-guild.dev/blog/better-type-safety-for-resolvers-with-graphql-codegen
Adds an index signature to any generates resolver. Default value: "false"
Disables/Enables Schema Stitching support.
By default, the resolver signature does not include the support for schema-stitching.
Set to false to enable that.
Default value: "true"
Set to true in order to wrap field definitions with FieldWrapper.
This is useful to allow return types such as Promises and functions. Needed for
compatibility with federation: true when
Default value: "true"
You can provide your custom GraphQLResolveInfo instead of the default one from graphql-js Default value: "graphql#GraphQLResolveInfo"
You can provide your custom ResolveFn instead the default. It has to be a type that uses the generics <TResult, TParent, TContext, TArgs>
Default value: "(parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => Promise
Allow you to override the ParentType generic in each resolver, by avoid enforcing the base type of the generated generic type.
This will generate ParentType = Type instead of ParentType extends Type = Type in each resolver.
Sets info argument of resolver function to be optional field. Useful for testing.
Set to true in order to allow the Resolver type to be callable
Adds _ to generated Args types in order to avoid duplicate identifiers.
Use this configuration to set a custom type for your context, and it will
affect all the resolvers, without the need to override it using generics each time.
If you wish to use an external type and import it from another file, you can use add plugin
and add the required import statement, or you can use a module#type syntax.
Use this configuration to set a custom type for the rootValue, and it will
affect resolvers of all root types (Query, Mutation and Subscription), without the need to override it using generics each time.
If you wish to use an external type and import it from another file, you can use add plugin
and add the required import statement, or you can use both module#type or module#namespace#type syntax.
Adds a suffix to the imported names to prevent name clashes.
Replaces a GraphQL type usage with a custom type, allowing you to return custom object from
your resolvers.
You can use both module#type and module#namespace#type syntax.
Allow you to set the default mapper when it's not being override by mappers or generics.
You can specify a type name, or specify a string in module#type or module#namespace#type format.
The default value of mappers is the TypeScript type generated by typescript package.
This will cause the generator to avoid using optionals (?),
so all field resolvers must be implemented in order to avoid compilation errors.
Default value: "false"
Warns about unused mappers. Default value: "true"
A raw configuration for enumValues map - can be represented with a single string value for a file path, a map between enum name and a file path, or a map between enum name and an object with explicit enum values.
Allow you to override resolverTypeWrapper definition.
Default value: "Promise
Supports Apollo Federation Default value: "false"
Allow you to disable prefixing for generated enums, works in combination with typesPrefix.
Default value: "true"
Allow you to disable suffixing for generated enums, works in combination with typesSuffix.
Default value: "true"
Configures behavior for custom directives from various GraphQL libraries.
1 nested properties
Sets the __resolveType field as optional field.
Default value: "false"
Generates immutable types by adding readonly to properties and uses ReadonlyArray.
Default value: "false"
Prefixes all GraphQL related generated types with that value, as namespaces import. You can use this feature to allow separation of plugins to different files. Default value: "''"
Suffix we add to each generated type resolver. Default value: "Resolvers"
The type name to use when exporting all resolvers signature as unified type. Default value: "Resolvers"
Defines the prefix value used for __resolveType and __isTypeOf resolvers.
If you are using mercurius-js, please set this field to empty string for better compatibility.
Default value: "'__'"
Makes __typename of resolver mappings non-optional without affecting the base types.
Default value: "false"
If true, recursively goes through all object type's fields, checks if they have abstract types and generates expected types correctly.
This may not work for cases where provided default mapper types are also nested e.g. defaultMapper: DeepPartial<{T}> or defaultMapper: Partial<{T}>.
Default value: "false"
If true, add field resolver types to Interfaces. By default, GraphQL Interfaces do not trigger any field resolvers, meaning every implementing type must implement the same resolver for the shared fields.
Some tools provide a way to change the default behaviour by making GraphQL Objects inherit missing resolvers from their Interface types. In these cases, it is fine to turn this option to true.
For example, if you are using @graphql-tools/schema#makeExecutableSchema with inheritResolversFromInterfaces: true,
you can make addInterfaceFieldResolverTypes: true as well
https://the-guild.dev/graphql/tools/docs/generate-schema#makeexecutableschema
Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin generates Apollo services (Query, Mutation and Subscription) with TypeScript typings.
It will generate a strongly typed Angular service for every defined query, mutation or subscription. The generated Angular services are ready to inject and use within your Angular component.
It extends the basic TypeScript plugins: @graphql-codegen/typescript, @graphql-codegen/typescript-operations - and thus shares a similar configuration.
To shed some more light regards this template, it's recommended to go through this article: https://apollo-angular.com/docs/get-started, and to read the Code Generation with Apollo Angular: https://the-guild.dev/blog/apollo-angular-12
Version of apollo-angular package
Default value: "2"
Allows to define ngModule as part of the plugin's config so it's globally available.
Defined the global value of namedClient.
Defined the global value of serviceName.
Defined the global value of serviceProvidedInRoot.
Define the Injector of the SDK class.
Set to true in order to generate a SDK service class that uses all generated services.
Default value: "false"
Allows to define a custom suffix for query operations. Default value: "GQL"
Allows to define a custom suffix for mutation operations. Default value: "GQL"
Allows to define a custom suffix for Subscription operations. Default value: "GQL"
Allows to define a custom Apollo-Angular package to import types from. Default value: "'apollo-angular'"
Add additional dependency injections for generated services Default value: ""
Add override modifier to make the generated code compatible with the noImplicitOverride option of Typescript v4.3+.
Default value: "false"
Customize from which module will gql be imported from.
This is useful if you want to use modules other than graphql-tag, e.g. graphql.macro.
Default value: "graphql-tag#gql"
Customize from which module will DocumentNode be imported from.
This is useful if you want to use modules other than graphql, e.g. @graphql-typed-document-node.
Default value: "graphql#DocumentNode"
Set this configuration to true if you wish to tell codegen to generate code with no export identifier.
Default value: "false"
Set this configuration to true if you wish to make sure to remove duplicate operation name suffix.
Default value: "false"
Set this configuration to true if you wish to disable auto add suffix of operation name, like Query, Mutation, Subscription, Fragment.
Default value: "false"
Adds a suffix to generated operation result type names Default value: ""
Changes the GraphQL operations variables prefix. Default value: ""
Changes the GraphQL operations variables suffix. Default value: "Document"
Changes the GraphQL fragments variables prefix. Default value: ""
Changes the GraphQL fragments variables suffix. Default value: "FragmentDoc"
If you are using documentMode: documentNode | documentNodeImportFragments, you can set this to true to apply document optimizations for your GraphQL document.
This will remove all "loc" and "description" fields from the compiled document, and will remove all empty arrays (such as directives, arguments and variableDefinitions).
Default value: "true"
This config is used internally by presets, but you can use it manually to tell codegen to prefix all base types that it's using.
This is useful if you wish to generate base types from typescript-operations plugin into a different file, and import it from there.
Default value: ""
This config should be used if documentMode is external. This has 2 usage:
- any string: This would be the path to import document nodes from. This can be used if we want to manually create the document nodes e.g. Use
graphql-tagin a separate file and export the generated document - 'near-operation-file': This is a special mode that is intended to be used with
near-operation-filepreset to import document nodes from those files. If these files are.graphqlfiles, we make use of webpack loader. Default value: ""
This config adds PURE magic comment to the static variables to enforce treeshaking for your bundler. Default value: "false"
If set to true, it will enable support for parsing variables on fragments. Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin generates the Typescript schema that enables queries and mutations to be typed in the Nhost SDK.
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
This plugin generates urql (https://github.com/FormidableLabs/urql) components and HOC with TypeScript typings.
Customized the output by enabling/disabling the generated Component. Default value: "false"
Customized the output by enabling/disabling the generated React Hooks. Default value: "true"
You can specify module that exports components Query, Mutation, Subscription and HOCs
This is useful for further abstraction of some common tasks (e.g. error handling).
Filepath relative to generated file can be also specified.
Default value: "urql"
Customize from which module will gql be imported from.
This is useful if you want to use modules other than graphql-tag, e.g. graphql.macro.
Default value: "graphql-tag#gql"
Customize from which module will DocumentNode be imported from.
This is useful if you want to use modules other than graphql, e.g. @graphql-typed-document-node.
Default value: "graphql#DocumentNode"
Set this configuration to true if you wish to tell codegen to generate code with no export identifier.
Default value: "false"
Set this configuration to true if you wish to make sure to remove duplicate operation name suffix.
Default value: "false"
Set this configuration to true if you wish to disable auto add suffix of operation name, like Query, Mutation, Subscription, Fragment.
Default value: "false"
Adds a suffix to generated operation result type names Default value: ""
Changes the GraphQL operations variables prefix. Default value: ""
Changes the GraphQL operations variables suffix. Default value: "Document"
Changes the GraphQL fragments variables prefix. Default value: ""
Changes the GraphQL fragments variables suffix. Default value: "FragmentDoc"
If you are using documentMode: documentNode | documentNodeImportFragments, you can set this to true to apply document optimizations for your GraphQL document.
This will remove all "loc" and "description" fields from the compiled document, and will remove all empty arrays (such as directives, arguments and variableDefinitions).
Default value: "true"
This config is used internally by presets, but you can use it manually to tell codegen to prefix all base types that it's using.
This is useful if you wish to generate base types from typescript-operations plugin into a different file, and import it from there.
Default value: ""
This config should be used if documentMode is external. This has 2 usage:
- any string: This would be the path to import document nodes from. This can be used if we want to manually create the document nodes e.g. Use
graphql-tagin a separate file and export the generated document - 'near-operation-file': This is a special mode that is intended to be used with
near-operation-filepreset to import document nodes from those files. If these files are.graphqlfiles, we make use of webpack loader. Default value: ""
This config adds PURE magic comment to the static variables to enforce treeshaking for your bundler. Default value: "false"
If set to true, it will enable support for parsing variables on fragments. Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin generates React Apollo components and HOC with TypeScript typings.
It extends the basic TypeScript plugins: @graphql-codegen/typescript, @graphql-codegen/typescript-operations - and thus shares a similar configuration.
Customize the output by enabling/disabling the generated Component (deprecated since Apollo-Client v3). For more details: https://apollographql.com/docs/react/api/react/components Default value: "false"
Customize the output by enabling/disabling the HOC (deprecated since Apollo-Client v3). For more details: https://apollographql.com/docs/react/api/react/hoc Default value: "false"
Customized the output by enabling/disabling the generated React Hooks. For more details: https://apollographql.com/docs/react/api/react/hooks Default value: "true"
Customized the output by enabling/disabling the generated mutation function signature. Default value: "true"
Enable generating a function to be used with refetchQueries Default value: "false"
Customize the package where apollo-react common lib is loaded from. Default value: "@apollo/react-common"
Customize the package where apollo-react component lib is loaded from. Default value: "@apollo/react-components"
Customize the package where apollo-react HOC lib is loaded from. Default value: "@apollo/react-hoc"
Customize the package where apollo-react hooks lib is loaded from. Default value: "@apollo/react-hooks"
You can specify a suffix that gets attached to the name of the generated component. Default value: "Component"
Sets the version of react-apollo.
If you are using the old (deprecated) package of react-apollo, please set this configuration to 2.
If you are using Apollo-Client v3, please set this to 3.
Default value: "3"
Customized the output by enabling/disabling the generated result type. Default value: "true"
Customized the output by enabling/disabling the generated mutation option type. Default value: "true"
Whether or not to include wrappers for Apollo's useFragment hook. Default value: "false"
Allows you to enable/disable the generation of docblocks in generated code. Some IDE's (like VSCode) add extra inline information with docblocks, you can disable this feature if your preferred IDE does not. Default value: "true"
7 nested properties
Customize from which module will gql be imported from.
This is useful if you want to use modules other than graphql-tag, e.g. graphql.macro.
Default value: "graphql-tag#gql"
Customize from which module will DocumentNode be imported from.
This is useful if you want to use modules other than graphql, e.g. @graphql-typed-document-node.
Default value: "graphql#DocumentNode"
Set this configuration to true if you wish to tell codegen to generate code with no export identifier.
Default value: "false"
Set this configuration to true if you wish to make sure to remove duplicate operation name suffix.
Default value: "false"
Set this configuration to true if you wish to disable auto add suffix of operation name, like Query, Mutation, Subscription, Fragment.
Default value: "false"
Adds a suffix to generated operation result type names Default value: ""
Changes the GraphQL operations variables prefix. Default value: ""
Changes the GraphQL operations variables suffix. Default value: "Document"
Changes the GraphQL fragments variables prefix. Default value: ""
Changes the GraphQL fragments variables suffix. Default value: "FragmentDoc"
If you are using documentMode: documentNode | documentNodeImportFragments, you can set this to true to apply document optimizations for your GraphQL document.
This will remove all "loc" and "description" fields from the compiled document, and will remove all empty arrays (such as directives, arguments and variableDefinitions).
Default value: "true"
This config is used internally by presets, but you can use it manually to tell codegen to prefix all base types that it's using.
This is useful if you wish to generate base types from typescript-operations plugin into a different file, and import it from there.
Default value: ""
This config should be used if documentMode is external. This has 2 usage:
- any string: This would be the path to import document nodes from. This can be used if we want to manually create the document nodes e.g. Use
graphql-tagin a separate file and export the generated document - 'near-operation-file': This is a special mode that is intended to be used with
near-operation-filepreset to import document nodes from those files. If these files are.graphqlfiles, we make use of webpack loader. Default value: ""
This config adds PURE magic comment to the static variables to enforce treeshaking for your bundler. Default value: "false"
If set to true, it will enable support for parsing variables on fragments. Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin generates
Customized the output by enabling/disabling the generated Vue composition functions. Default value: "true"
Default value: ""
Default value: ""
Allows you to enable/disable the generation of docblocks in generated code. Some IDE's (like VSCode) add extra inline information with docblocks, you can disable this feature if your preferred IDE does not. Default value: "true"
Allows you to set the clientId in the composition functions when using multiple apollo clients. Default value: "null"
Customize from which module will gql be imported from.
This is useful if you want to use modules other than graphql-tag, e.g. graphql.macro.
Default value: "graphql-tag#gql"
Customize from which module will DocumentNode be imported from.
This is useful if you want to use modules other than graphql, e.g. @graphql-typed-document-node.
Default value: "graphql#DocumentNode"
Set this configuration to true if you wish to tell codegen to generate code with no export identifier.
Default value: "false"
Set this configuration to true if you wish to make sure to remove duplicate operation name suffix.
Default value: "false"
Set this configuration to true if you wish to disable auto add suffix of operation name, like Query, Mutation, Subscription, Fragment.
Default value: "false"
Adds a suffix to generated operation result type names Default value: ""
Changes the GraphQL operations variables prefix. Default value: ""
Changes the GraphQL operations variables suffix. Default value: "Document"
Changes the GraphQL fragments variables prefix. Default value: ""
Changes the GraphQL fragments variables suffix. Default value: "FragmentDoc"
If you are using documentMode: documentNode | documentNodeImportFragments, you can set this to true to apply document optimizations for your GraphQL document.
This will remove all "loc" and "description" fields from the compiled document, and will remove all empty arrays (such as directives, arguments and variableDefinitions).
Default value: "true"
This config is used internally by presets, but you can use it manually to tell codegen to prefix all base types that it's using.
This is useful if you wish to generate base types from typescript-operations plugin into a different file, and import it from there.
Default value: ""
This config should be used if documentMode is external. This has 2 usage:
- any string: This would be the path to import document nodes from. This can be used if we want to manually create the document nodes e.g. Use
graphql-tagin a separate file and export the generated document - 'near-operation-file': This is a special mode that is intended to be used with
near-operation-filepreset to import document nodes from those files. If these files are.graphqlfiles, we make use of webpack loader. Default value: ""
This config adds PURE magic comment to the static variables to enforce treeshaking for your bundler. Default value: "false"
If set to true, it will enable support for parsing variables on fragments. Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin generates Vue Apollo Smart Query, Smart Subscription and mutation operation functions with TypeScript typings.
This plugin relies on some helper functions and types from the vue-apollo-smart-ops package. That package also adds
some optional functionality for improved error handling in Vue Apollo operations which can be configured in the
generated code from this plugin.
It extends the basic TypeScript plugins: @graphql-codegen/typescript, @graphql-codegen/typescript-operations -
and thus shares a similar configuration.
Customize the output by enabling/disabling the generated Vue Apollo Smart Operations functions. Default value: "true"
The typescript-vue-apollo-smart-ops plugin requires three functions that are used to define your
query, subscription and mutation operation functions:
createMutationFunctioncreateSmartQueryOptionsFunctioncreateSmartSubscriptionOptionsFunction
By default, these functions are provided by the vue-apollo-smart-ops package, but you can substitute
your own import path if you want to replace them with other implementations.
Default value: "vue-apollo-smart-ops"
The operation functions generated by typescript-vue-apollo-smart-ops include some functionality for
error handling. This configuration parameter allows you to customise the name of the error type that
will be used. The default is to use ApolloError from the apollo-client package.
Default value: "ApolloError"
The operation functions generated by typescript-vue-apollo-smart-ops include some functionality for
error handling. This configuration parameter allows you to customise the package where the error type
will be imported from. The default is to use ApolloError from the apollo-client package.
Default value: "vue-apollo-smart-ops"
The operation functions generated by typescript-vue-apollo-smart-ops include some functionality for
error handling. You may supply an error handler function that will be called when an error occurs in
a query, subscription or mutation operation. This function should implement the
ApolloOperationErrorHandlerFunction interface from vue-apollo-smart-ops package. You can
have a custom handler in your app that shows a notification to the user, for example. If unspecified,
this functionality will be disabled and errors handled (or not) by Vue Apollo in the normal way.
Default value: "undefined"
The import path where vueApolloErrorHandlerFunction should be imported from. Can be a package name
or a local file path (anything that works in an import statement).
Default value: "undefined"
The operation functions generated by typescript-vue-apollo-smart-ops include some functionality for
error handling. When an error occurs, the Vue app instance is passed to the error handler. You can
customise the expected type of the app object. For example, a Nuxt.js app might use NuxtApp from
@nuxt/types/app instead. When unspecified, the default type is Vue from vue/types/vue.
Default value: "undefined"
The import path where vueAppType should be imported from. Can be a package name or a local file path
(anything that works in an import statement).
Default value: "undefined"
Allows you to enable/disable the generation of docblocks in generated code. Some IDE's (like VSCode) add extra inline information with docblocks, you can disable this feature if your preferred IDE does not. Default value: "true"
Customize from which module will gql be imported from.
This is useful if you want to use modules other than graphql-tag, e.g. graphql.macro.
Default value: "graphql-tag#gql"
Customize from which module will DocumentNode be imported from.
This is useful if you want to use modules other than graphql, e.g. @graphql-typed-document-node.
Default value: "graphql#DocumentNode"
Set this configuration to true if you wish to tell codegen to generate code with no export identifier.
Default value: "false"
Set this configuration to true if you wish to make sure to remove duplicate operation name suffix.
Default value: "false"
Set this configuration to true if you wish to disable auto add suffix of operation name, like Query, Mutation, Subscription, Fragment.
Default value: "false"
Adds a suffix to generated operation result type names Default value: ""
Changes the GraphQL operations variables prefix. Default value: ""
Changes the GraphQL operations variables suffix. Default value: "Document"
Changes the GraphQL fragments variables prefix. Default value: ""
Changes the GraphQL fragments variables suffix. Default value: "FragmentDoc"
If you are using documentMode: documentNode | documentNodeImportFragments, you can set this to true to apply document optimizations for your GraphQL document.
This will remove all "loc" and "description" fields from the compiled document, and will remove all empty arrays (such as directives, arguments and variableDefinitions).
Default value: "true"
This config is used internally by presets, but you can use it manually to tell codegen to prefix all base types that it's using.
This is useful if you wish to generate base types from typescript-operations plugin into a different file, and import it from there.
Default value: ""
This config should be used if documentMode is external. This has 2 usage:
- any string: This would be the path to import document nodes from. This can be used if we want to manually create the document nodes e.g. Use
graphql-tagin a separate file and export the generated document - 'near-operation-file': This is a special mode that is intended to be used with
near-operation-filepreset to import document nodes from those files. If these files are.graphqlfiles, we make use of webpack loader. Default value: ""
This config adds PURE magic comment to the static variables to enforce treeshaking for your bundler. Default value: "false"
If set to true, it will enable support for parsing variables on fragments. Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin generates urql (https://github.com/FormidableLabs/urql) composition functions with TypeScript typings.
Customized the output by enabling/disabling the generated Vue Composition functions. Default value: "true"
You can specify module that exports components Query, Mutation, Subscription
This is useful for further abstraction of some common tasks (e.g. error handling).
Filepath relative to generated file can be also specified.
Default value: "urql"
Customize from which module will gql be imported from.
This is useful if you want to use modules other than graphql-tag, e.g. graphql.macro.
Default value: "graphql-tag#gql"
Customize from which module will DocumentNode be imported from.
This is useful if you want to use modules other than graphql, e.g. @graphql-typed-document-node.
Default value: "graphql#DocumentNode"
Set this configuration to true if you wish to tell codegen to generate code with no export identifier.
Default value: "false"
Set this configuration to true if you wish to make sure to remove duplicate operation name suffix.
Default value: "false"
Set this configuration to true if you wish to disable auto add suffix of operation name, like Query, Mutation, Subscription, Fragment.
Default value: "false"
Adds a suffix to generated operation result type names Default value: ""
Changes the GraphQL operations variables prefix. Default value: ""
Changes the GraphQL operations variables suffix. Default value: "Document"
Changes the GraphQL fragments variables prefix. Default value: ""
Changes the GraphQL fragments variables suffix. Default value: "FragmentDoc"
If you are using documentMode: documentNode | documentNodeImportFragments, you can set this to true to apply document optimizations for your GraphQL document.
This will remove all "loc" and "description" fields from the compiled document, and will remove all empty arrays (such as directives, arguments and variableDefinitions).
Default value: "true"
This config is used internally by presets, but you can use it manually to tell codegen to prefix all base types that it's using.
This is useful if you wish to generate base types from typescript-operations plugin into a different file, and import it from there.
Default value: ""
This config should be used if documentMode is external. This has 2 usage:
- any string: This would be the path to import document nodes from. This can be used if we want to manually create the document nodes e.g. Use
graphql-tagin a separate file and export the generated document - 'near-operation-file': This is a special mode that is intended to be used with
near-operation-filepreset to import document nodes from those files. If these files are.graphqlfiles, we make use of webpack loader. Default value: ""
This config adds PURE magic comment to the static variables to enforce treeshaking for your bundler. Default value: "false"
If set to true, it will enable support for parsing variables on fragments. Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin generates Stencil Apollo functional components typings
It extends the basic TypeScript plugins: @graphql-codegen/typescript, @graphql-codegen/typescript-operations - and thus shares a similar configuration.
Customize from which module will gql be imported from.
This is useful if you want to use modules other than graphql-tag, e.g. graphql.macro.
Default value: "graphql-tag#gql"
Customize from which module will DocumentNode be imported from.
This is useful if you want to use modules other than graphql, e.g. @graphql-typed-document-node.
Default value: "graphql#DocumentNode"
Set this configuration to true if you wish to tell codegen to generate code with no export identifier.
Default value: "false"
Set this configuration to true if you wish to make sure to remove duplicate operation name suffix.
Default value: "false"
Set this configuration to true if you wish to disable auto add suffix of operation name, like Query, Mutation, Subscription, Fragment.
Default value: "false"
Adds a suffix to generated operation result type names Default value: ""
Changes the GraphQL operations variables prefix. Default value: ""
Changes the GraphQL operations variables suffix. Default value: "Document"
Changes the GraphQL fragments variables prefix. Default value: ""
Changes the GraphQL fragments variables suffix. Default value: "FragmentDoc"
If you are using documentMode: documentNode | documentNodeImportFragments, you can set this to true to apply document optimizations for your GraphQL document.
This will remove all "loc" and "description" fields from the compiled document, and will remove all empty arrays (such as directives, arguments and variableDefinitions).
Default value: "true"
This config is used internally by presets, but you can use it manually to tell codegen to prefix all base types that it's using.
This is useful if you wish to generate base types from typescript-operations plugin into a different file, and import it from there.
Default value: ""
This config should be used if documentMode is external. This has 2 usage:
- any string: This would be the path to import document nodes from. This can be used if we want to manually create the document nodes e.g. Use
graphql-tagin a separate file and export the generated document - 'near-operation-file': This is a special mode that is intended to be used with
near-operation-filepreset to import document nodes from those files. If these files are.graphqlfiles, we make use of webpack loader. Default value: ""
This config adds PURE magic comment to the static variables to enforce treeshaking for your bundler. Default value: "false"
If set to true, it will enable support for parsing variables on fragments. Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin generates TypeScript source .ts file from GraphQL files .graphql.
Adds prefix to the name Default value: ""
Adds suffix to the name Default value: ""
Adds prefix to the fragment variable Default value: ""
Adds suffix to the fragment variable Default value: ""
Customize from which module will gql be imported from.
This is useful if you want to use modules other than graphql-tag, e.g. graphql.macro.
Default value: "graphql-tag#gql"
Customize from which module will DocumentNode be imported from.
This is useful if you want to use modules other than graphql, e.g. @graphql-typed-document-node.
Default value: "graphql#DocumentNode"
Set this configuration to true if you wish to tell codegen to generate code with no export identifier.
Default value: "false"
Set this configuration to true if you wish to make sure to remove duplicate operation name suffix.
Default value: "false"
Set this configuration to true if you wish to disable auto add suffix of operation name, like Query, Mutation, Subscription, Fragment.
Default value: "false"
Adds a suffix to generated operation result type names Default value: ""
Changes the GraphQL operations variables prefix. Default value: ""
Changes the GraphQL operations variables suffix. Default value: "Document"
Changes the GraphQL fragments variables prefix. Default value: ""
Changes the GraphQL fragments variables suffix. Default value: "FragmentDoc"
If you are using documentMode: documentNode | documentNodeImportFragments, you can set this to true to apply document optimizations for your GraphQL document.
This will remove all "loc" and "description" fields from the compiled document, and will remove all empty arrays (such as directives, arguments and variableDefinitions).
Default value: "true"
This config is used internally by presets, but you can use it manually to tell codegen to prefix all base types that it's using.
This is useful if you wish to generate base types from typescript-operations plugin into a different file, and import it from there.
Default value: ""
This config should be used if documentMode is external. This has 2 usage:
- any string: This would be the path to import document nodes from. This can be used if we want to manually create the document nodes e.g. Use
graphql-tagin a separate file and export the generated document - 'near-operation-file': This is a special mode that is intended to be used with
near-operation-filepreset to import document nodes from those files. If these files are.graphqlfiles, we make use of webpack loader. Default value: ""
This config adds PURE magic comment to the static variables to enforce treeshaking for your bundler. Default value: "false"
If set to true, it will enable support for parsing variables on fragments. Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin generates msw (https://github.com/mswjs/msw) mock handlers with TypeScript typings.
GraphQL endpoint to use when working with multiple backends.
3 nested properties
This plugin and presets creates generated mappers and parsers for a complete type-safe GraphQL requests, for developers that uses Apollo Android runtime.
Customize the Java package name for the generated operations. The default package name will be generated according to the output file path.
Customize the Java package name for the types generated based on input types.
Customize the Java package name for the fragments generated classes.
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
Customize the Java package name. The default package name will be generated according to the output file path.
Allow you to replace specific GraphQL types with your custom model classes. This is useful when you want to make sure your resolvers returns the correct class.
The default value is the values set by defaultMapper configuration.
You can use a direct path to the package, or use package#class syntax to have it imported.
Sets the default mapper value in case it's not specified by mappers.
You can use a direct path to the package, or use package#class syntax to have it imported.
The default mapper is Java's Object.
Default value: "Object"
Allow you to customize the parent class name. Default value: "Resolvers"
Allow you to customize the list type. Default value: "Iterable"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
Customize the Java package name. The default package name will be generated according to the output file path.
A raw configuration for enumValues map - can be represented with a single string value for a file path, a map between enum name and a file path, or a map between enum name and an object with explicit enum values.
Allow you to customize the list type Default value: "Iterable"
Allow you to enable generation for the types Default value: "false"
Allow you to omit JvmStatic annotation Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin generates Flow types based on your GraphQLSchema.
It generates types for your entire schema: types, input types, enum, interface, scalar and union.
Generates Flow types as Exact types. Default value: "true"
Generates read-only Flow types Default value: "false"
Adds _ to generated Args types in order to avoid duplicate identifiers.
A raw configuration for enumValues map - can be represented with a single string value for a file path, a map between enum name and a file path, or a map between enum name and an object with explicit enum values.
Overrides the default output for various GraphQL elements.
Allow you to disable prefixing for generated enums, works in combination with typesPrefix.
Default value: "true"
Allow you to add wrapper for field type, use T as the generic value. Make sure to set wrapFieldDefinitions to true in order to make this flag work.
Default value: "T"
Set to true in order to wrap field definitions with FieldWrapper.
This is useful to allow return types such as Promises and functions.
Default value: "false"
This will cause the generator to emit types for enums only Default value: "false"
This will cause the generator to emit types for operations only (basically only enums and scalars) Default value: "false"
This will cause the generator to ignore enum values defined in GraphQLSchema Default value: "false"
Set to true in order to wrap field definitions with EntireFieldWrapper.
This is useful to allow return types such as Promises and functions for fields.
Differs from wrapFieldDefinitions in that this wraps the entire field definition if i.e. the field is an Array, while
wrapFieldDefinitions will wrap every single value inside the array.
Default value: "true"
Allow to override the type value of EntireFieldWrapper. This wrapper applies outside of Array and Maybe
unlike fieldWrapperValue, that will wrap the inner type.
Default value: "T | Promise
Adds a suffix to the imported names to prevent name clashes.
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Removes fragment duplicates for reducing data transfer. It is done by removing sub-fragments imports from fragment definition Instead - all of them are imported to the Operation node. Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
This plugin generates resolvers signature based on your GraphQLSchema.
It generates types for your entire schema: types, input types, enum, interface, scalar and union.
This plugin requires you to use @graphql-codegen/flow as well, because it depends on it's types.
Adds _ to generated Args types in order to avoid duplicate identifiers.
Use this configuration to set a custom type for your context, and it will
affect all the resolvers, without the need to override it using generics each time.
If you wish to use an external type and import it from another file, you can use add plugin
and add the required import statement, or you can use a module#type syntax.
Use this configuration to set a custom type for the rootValue, and it will
affect resolvers of all root types (Query, Mutation and Subscription), without the need to override it using generics each time.
If you wish to use an external type and import it from another file, you can use add plugin
and add the required import statement, or you can use both module#type or module#namespace#type syntax.
Adds a suffix to the imported names to prevent name clashes.
Replaces a GraphQL type usage with a custom type, allowing you to return custom object from
your resolvers.
You can use both module#type and module#namespace#type syntax.
Allow you to set the default mapper when it's not being override by mappers or generics.
You can specify a type name, or specify a string in module#type or module#namespace#type format.
The default value of mappers is the TypeScript type generated by typescript package.
This will cause the generator to avoid using optionals (?),
so all field resolvers must be implemented in order to avoid compilation errors.
Default value: "false"
Warns about unused mappers. Default value: "true"
A raw configuration for enumValues map - can be represented with a single string value for a file path, a map between enum name and a file path, or a map between enum name and an object with explicit enum values.
Allow you to override resolverTypeWrapper definition.
Default value: "Promise
Supports Apollo Federation Default value: "false"
Allow you to disable prefixing for generated enums, works in combination with typesPrefix.
Default value: "true"
Sets the __resolveType field as optional field.
Default value: "false"
Generates immutable types by adding readonly to properties and uses ReadonlyArray.
Default value: "false"
Prefixes all GraphQL related generated types with that value, as namespaces import. You can use this feature to allow separation of plugins to different files. Default value: "''"
Suffix we add to each generated type resolver. Default value: "Resolvers"
The type name to use when exporting all resolvers signature as unified type. Default value: "Resolvers"
Defines the prefix value used for __resolveType and __isTypeOf resolvers.
If you are using mercurius-js, please set this field to empty string for better compatibility.
Default value: "'__'"
Turning this flag to true will generate resolver signature that has only resolveType for interfaces, forcing developers to write inherited type resolvers in the type itself.
Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Removes fragment duplicates for reducing data transfer. It is done by removing sub-fragments imports from fragment definition Instead - all of them are imported to the Operation node. Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
This plugin generates Flow types based on your GraphQLSchema and your GraphQL operations and fragments.
It generates types for your GraphQL documents: Query, Mutation, Subscription and Fragment.
This plugin requires you to use @graphql-codegen/flow as well, because it depends on its types.
Generates Flow types as Exact types. Default value: "true"
Generates read-only Flow types Default value: "false"
Flatten fragment spread and inline fragments into a simple selection set before generating. Default value: "false"
Uses primitive types where possible.
Set to false in order to use Pick and take use the types generated by typescript plugin.
Default value: "true"
Avoid adding __typename for root types. This is ignored when a selection explicitly specifies __typename.
Default value: "false"
Puts all generated code under global namespace. Useful for Stencil integration.
Default value: "false"
Adds a suffix to generated operation result type names Default value: ""
Set this configuration to true if you wish to make sure to remove duplicate operation name suffix.
Default value: "false"
Set this configuration to true if you wish to disable auto add suffix of operation name, like Query, Mutation, Subscription, Fragment.
Default value: "false"
If set to true, it will export the sub-types created in order to make it easier to access fields declared under fragment spread. Default value: "false"
If set to true, it will enable support for parsing variables on fragments. Default value: "false"
If set to true, merge equal fragment interfaces. Default value: "false"
Adds _ to generated Args types in order to avoid duplicate identifiers.
A raw configuration for enumValues map - can be represented with a single string value for a file path, a map between enum name and a file path, or a map between enum name and an object with explicit enum values.
Overrides the default output for various GraphQL elements.
Allow you to disable prefixing for generated enums, works in combination with typesPrefix.
Default value: "true"
Allow you to add wrapper for field type, use T as the generic value. Make sure to set wrapFieldDefinitions to true in order to make this flag work.
Default value: "T"
Set to true in order to wrap field definitions with FieldWrapper.
This is useful to allow return types such as Promises and functions.
Default value: "false"
This will cause the generator to emit types for enums only Default value: "false"
This will cause the generator to emit types for operations only (basically only enums and scalars) Default value: "false"
This will cause the generator to ignore enum values defined in GraphQLSchema Default value: "false"
Set to true in order to wrap field definitions with EntireFieldWrapper.
This is useful to allow return types such as Promises and functions for fields.
Differs from wrapFieldDefinitions in that this wraps the entire field definition if i.e. the field is an Array, while
wrapFieldDefinitions will wrap every single value inside the array.
Default value: "true"
Allow to override the type value of EntireFieldWrapper. This wrapper applies outside of Array and Maybe
unlike fieldWrapperValue, that will wrap the inner type.
Default value: "T | Promise
Adds a suffix to the imported names to prevent name clashes.
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Removes fragment duplicates for reducing data transfer. It is done by removing sub-fragments imports from fragment definition Instead - all of them are imported to the Operation node. Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
This plugin generates a GraphQL introspection file based on your GraphQL schema.
Set to true in order to minify the JSON output.
Default value: "false"
Whether to include descriptions in the introspection result. Default value: "true"
Whether to include specifiedByUrl in the introspection result.
Default value: "false"
Whether to include isRepeatable flag on directives.
Default value: "true"
Whether to include description field on schema.
Default value: "false"
This plugin generates an introspection file but only with Interfaces and Unions, based on your GraphQLSchema.
If you are using apollo-client and your schema contains interface or union declaration, it's recommended to use Apollo's Fragment Matcher and the result generated by the plugin.
You can read more about it in apollo-client documentation.
Fragment Matcher plugin accepts a TypeScript / JavaScript or a JSON file as an output (.ts, .tsx, .js, .jsx, .json).
Both in TypeScript and JavaScript a default export is being used.
The output is based on the output you choose for the output file name.
Compatible only with JSON extension, allow you to choose the export type, either module.exports or export default. Allowed values are: commonjs, es2015.
Default value: "es2015"
Compatible only with TS/TSX/JS/JSX extensions, allow you to generate output based on your Apollo Client version. Note: 3 also works for version 4.
Default value: "3"
Create an explicit type based on your schema. This can help IDEs autofill your fragment matcher. This is mostly useful if you do more with your fragment matcher than just pass it to an Apollo-Client. Default value: "false"
When enabled sorts the fragment types lexicographically. This is useful for deterministic output. Default value: "false"
This plugin generates an introspection file for Schema Awareness feature of Urql Cache Exchange
You can read more about it in urql documentation: https://formidable.com/open-source/urql/docs/graphcache/schema-awareness.
Urql Introspection plugin accepts a TypeScript / JavaScript or a JSON file as an output (.ts, .tsx, .js, .jsx, .json).
Both in TypeScript and JavaScript a default export is being used.
The output is based on the output you choose for the output file name.
Compatible only with JSON extension, allow you to choose the export type, either module.exports or export default. Allowed values are: commonjs, es2015.
Default value: "es2015"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Includes scalar names (instead of an Any replacement) in the output when enabled.
Default value: "false"
Includes enums (instead of an Any replacement) in the output when enabled.
Default value: "false"
Includes all input objects (instead of an Any replacement) in the output when enabled.
Default value: "false"
Includes all directives in the output when enabled. Default value: "false"
Choose the collection name to be generated. Defaults to allowed-queries Default value: "allowed-queries"
Target metadata config version. Supported versions are 2 and 3. This is mostly for future proofing, currently has no impact as both versions use the same format. The default value will change in the future if/when newer config versions are released. Default value: "3"
Whether to source fragments per-document, or globally. If set, will enforce fragment name uniqueness Default value: "false"
Whether to order fragments by global definition order, or by definition order in the document Default value: "definition"
Required, should point to the base schema types file. The key of the output is used a base path for this file.
Overrides the package import for the base types. Use this if you are within a monorepo, and you wish to import the base types directly from a different package, and not from a relative path.
Optional, override the cwd of the execution. We are using cwd to figure out the imports between files. Use this if your execution path is not your project root directory.
Default value: "process.cwd()"
Optional, override the name of the import namespace used to import from the baseTypesPath file.
Default value: "Types"
Required, sets the file name for the generated files.
Configure how to encapsulate the module types, to avoid confusion.
namespace (default): will wrap all types in a TypeScript namespace, using the module name.
prefix: will prefix all types from a specific module with the module name.
none: will skip encapsulation, and generate type as-is.
Default value: "namespace"
Generate resolvers of root types (Query, Mutation and Subscription) as non-optional. Default value: "false"
By default, the generated types will generate some code specific to graphql-modules library.
If you are not using GraphQL-Modules, you can disable this feature by setting this to false.
Default value: "true"
points to the base schema types file. The key of the output is used a the base path for this file.
If you wish to use an NPM package or a local workspace package, make sure to prefix the package name with ~.
Overrides all external fragments import types by using a specific file path or a package name.
If you wish to use an NPM package or a local workspace package, make sure to prefix the package name with ~.
Optional, sets a specific file name for the generated files. Use this to override the generated file name when generating files for example based on multiple .graphql files in separate directories.
Optional, sets the extension for the generated files. Use this to override the extension if you are using plugins that requires a different type of extensions (such as typescript-react-apollo)
Default value: ".generated.ts"
Optional, override the cwd of the execution. We are using cwd to figure out the imports between files. Use this if your execution path is not your project root directory.
Default value: "process.cwd()"
Optional, defines a folder, (Relative to the source files) where the generated files will be created. Default value: "''"
Optional, override the name of the import namespace used to import from the baseTypesPath file.
Default value: "Types"
Required, should point to the base schema types file. The key of the output is used a the base path for this file.
Optional, override the name of the import namespace used to import from the baseTypesPath file.
Default value: "Types"
Schema Definition
A Schema is created by supplying the root types of each type of operation, query and mutation (optional). A schema definition is then supplied to the validator and executor.
Example:
const MyAppSchema = new GraphQLSchema({
query: MyAppQueryRootType,
mutation: MyAppMutationRootType,
})
Note: When the schema is constructed, by default only the types that are reachable by traversing the root types are included, other types must be explicitly referenced.
Example:
const characterInterface = new GraphQLInterfaceType({
name: 'Character',
...
});
const humanType = new GraphQLObjectType({
name: 'Human',
interfaces: [characterInterface],
...
});
const droidType = new GraphQLObjectType({
name: 'Droid',
interfaces: [characterInterface],
...
});
const schema = new GraphQLSchema({
query: new GraphQLObjectType({
name: 'Query',
fields: {
hero: { type: characterInterface, ... },
}
}),
...
// Since this schema references only the `Character` interface it's
// necessary to explicitly list the types that implement it if
// you want them to be included in the final schema.
types: [humanType, droidType],
})
Note: If an array of directives are provided to GraphQLSchema, that will be
the exact list of directives represented and allowed. If directives is not
provided then a default set of the specified directives (e.g. @include and
@skip) will be used. If you wish to provide additional directives to these
specified directives, you must explicitly declare them. Example:
const MyAppSchema = new GraphQLSchema({
...
directives: specifiedDirectives.concat([ myCustomDirective ]),
})
Conveniently represents flow's "Maybe" type https://flow.org/en/docs/types/maybe/
Custom extensions
Conveniently represents flow's "Maybe" type https://flow.org/en/docs/types/maybe/
Custom extensions
Type System Definitions
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
4 nested properties
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Type System Definitions
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
2 nested properties
Represents a range of characters represented by a lexical token within a Source.
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
An exported enum describing the different kinds of tokens that the lexer emits.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
2 nested properties
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Directives
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Name
3 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Directives
Name
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Name
3 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Name
3 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
3 nested properties
Types
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Types
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Name
3 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Types
Type System Definitions
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
4 nested properties
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Type System Extensions
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Type System Extensions
A GraphQLError describes an Error found during the parse, validate, or execute phases of performing a GraphQL operation. In addition to a message and stack trace, it also includes information about the locations in a GraphQL document and/or execution result that correspond to the Error.
An array of { line, column } locations within the source GraphQL document
which correspond to this error.
Errors during validation often contain multiple locations, for example to point out two things with the same name. Errors during execution include a single location, the field which produced the error.
Enumerable, and appears in the result of JSON.stringify().
An array describing the JSON-path into the execution response which corresponds to this error. Only included for errors during execution.
Enumerable, and appears in the result of JSON.stringify().
An array of GraphQL AST Nodes corresponding to this error.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
2 nested properties
An array of character offsets within the source GraphQL document which correspond to this error.
3 nested properties
Custom extensions
An optional schema coordinate (e.g. "MyType.myField") associated with this error.
Represents a location in a Source.
The list of all possible AST node types.
Document
Document
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Document
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Name
3 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
3 nested properties
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
3 nested properties
Values
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Type Reference
Values
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Name
3 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Values
Type Reference
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Type Reference
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Directives
Directives
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Name
3 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Name
3 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Values
Values
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Name
3 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Values
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Name
3 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Name
3 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
3 nested properties
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Fragments
Fragments
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Name
3 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Fragments
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
3 nested properties
Types
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
3 nested properties
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Name
3 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
3 nested properties
Types
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
3 nested properties
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Type Definitions
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
4 nested properties
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Name
3 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Type Definitions
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
4 nested properties
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Name
3 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
4 nested properties
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Name
3 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Type Reference
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
4 nested properties
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Name
3 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Type Reference
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
4 nested properties
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Name
3 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
4 nested properties
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Name
3 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
4 nested properties
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Name
3 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
4 nested properties
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Name
3 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
4 nested properties
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Name
3 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Directive Definitions
Directive Definitions
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
4 nested properties
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Name
3 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Directive Definitions
Type Extensions
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Name
3 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Type Extensions
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Name
3 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Name
3 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Name
3 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Name
3 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
9 nested properties
An exported enum describing the different kinds of tokens that the lexer emits.
The character offset at which this Node begins.
The character offset at which this Node ends.
The 1-indexed line number on which this Token appears.
The 1-indexed column number at which this Token begins.
For non-punctuation tokens, represents the interpreted value of the token.
Note: is undefined for punctuation tokens, but typed as string for convenience in the parser.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
4 nested properties
Name
3 nested properties
Name
Contains a range of UTF-8 character offsets and token references that identify the region of the source from which the AST derived.
6 nested properties
The character offset at which this Node begins.
The character offset at which this Node ends.
Represents a range of characters represented by a lexical token within a Source.
Represents a range of characters represented by a lexical token within a Source.
A representation of source input to GraphQL. The name and locationOffset parameters are
optional, but they are useful for clients who store GraphQL documents in source files.
For example, if the GraphQL input starts at line 40 in a file named Foo.graphql, it might
be useful for name to be "Foo.graphql" and location to be { line: 40, column: 1 }.
The line and column properties in locationOffset are 1-indexed.
Custom extensions
Loads schema using a pointer, with a custom loader (code file).
Specify a path to a custom code file (local or module) that will handle the schema loading.
Loads schema using a pointer, without using require while looking for schemas in code files.
Set this to true in order to tell codegen not to try to require files in order to find schema/docs
Set this to true in order to tell codegen not to try to extract GraphQL AST strings schema/docs
Set this to true in order to tell codegen to skip documents validation.
Loads a schema from remote endpoint, with custom http options.
HTTP headers you wish to add to the HTTP request sent by codegen to fetch your GraphQL remote schema.
Specify a Node module name, a custom file, or a function, to be used instead of a standard fetch.
HTTP Method to use, either POST (default) or GET.
Handling the response as SDL will allow you to load schema from remote server that doesn't return a JSON introspection.
A function to use for fetching the schema.
A function to use for fetching the schema.
Loads a schema a local file or files, with customized options for parsing/loading.
Skips checks for graphql-import syntax and loads the file as-is, without imports support. Default value: "true"
Converts all GraphQL comments (# sign) to descriptions during the parse phase, to make it available
for plugins later.
Default value: "false"
Set to true to assume the SDL is valid. Default value: "false"
By default, the parser creates AST nodes that know the location in the source that they correspond to. This configuration flag disables that behavior for performance or testing. Default value: "false"
If enabled, the parser will parse empty fields sets in the Schema Definition Language. Otherwise, the parser will follow the current specification.
This option is provided to ease adoption of the final SDL specification and will be removed in v16. Default value: "false"
If enabled, the parser will parse implemented interfaces with no &
character between each interface. Otherwise, the parser will follow the
current specification.
This option is provided to ease adoption of the final SDL specification and will be removed in v16. Default value: "false"
EXPERIMENTAL:
If enabled, the parser will understand and parse variable definitions
contained in a fragment definition. They'll be represented in the
variableDefinitions field of the FragmentDefinitionNode.
The syntax is identical to normal, query-defined variables. For example:
fragment A($var: Boolean = false) on T { ... }
Note: this feature is experimental and may change or be removed in the future. Default value: "false"
Additional options for loading from Apollo Engine
14 nested properties
2 nested properties
Set to true in order to convert all GraphQL comments (marked with # sign) to descriptions (""")
GraphQL has built-in support for transforming descriptions to comments (with print), but not while
parsing. Turning the flag on will support the other way as well (parse)
Set to true to assume the SDL is valid.
Default: false
When building a schema from a GraphQL service's introspection result, it might be safe to assume the schema is valid. Set to true to assume the produced schema is valid.
Default: false
Additional options for loading from Apollo Engine
2 nested properties
Set to true in order to convert all GraphQL comments (marked with # sign) to descriptions (""")
GraphQL has built-in support for transforming descriptions to comments (with print), but not while
parsing. Turning the flag on will support the other way as well (parse)
Set to true to assume the SDL is valid.
Default: false
When building a schema from a GraphQL service's introspection result, it might be safe to assume the schema is valid. Set to true to assume the produced schema is valid.
Default: false
A URL to your GraphQL endpoint, a local path to .graphql file, a glob pattern to your GraphQL schema files, or a JavaScript file that exports the schema to generate code from. This can also be an array which specifies multiple schemas to generate code from. You can read more about the supported formats here.
Specify a path to a custom loader for your GraphQL documents.
Specify a path to a custom code file (local or module) that will handle the documents loading.
configure the flutter-freezed plugin
15 nested properties
Setting this option to true will camelCase enum values as required by Dart's recommended linter.
If set to false, the original casing as specified in the Graphql Schema is used
You can also transform the casing by specifying your preferred casing for Enum values.
Available options are: 'snake_case', 'camelCase' and 'PascalCase'
For consistency, this option applies the same configuration to all Enum Types in the GraphQL Schema Default value: "true"
The freezed library has this option enabled by default.
Use this option to enable/disable this option completely.
The plugin by default generates immutable Freezed models using the @freezed decorator.
If this option is configured, the plugin will generate immutable Freezed models using the @Freezed(copyWith: value) instead.
Setting a boolean value will enable/disable this option globally for every GraphQL Type
but you can also set this option to true for one or more GraphQL Types using a TypeNamePattern.
Default value: "undefined"
The key is the GraphQL Scalar Type and the value is the equivalent Dart Type
The plugin automatically handles built-in GraphQL Scalar Types so only specify the custom Scalars in your Graphql Schema. Default value: "[object Object]"
This will annotate the generated parameter with a @Default(value: defaultValue) decorator.
The default value will be interpolated into the @Default(value: ${value}) decorator so
Use backticks for the value element so that you can use quotation marks for string values.
E.g: "I'm a string default value" but Episode.jedi is not a string value.
Use the appliesOn to specify where this option should be applied on
Default value: "undefined"
Using a TypeNamePattern, you can mark an entire factory constructor for one or more GraphQL types as deprecated.
Likewise, using a FieldNamePattern, you can mark one or more fields as deprecated
Since the first element in the tuple has a type signature of Pattern,
you can use either TypeNamePattern or FieldNamePattern or use both
by composing them with Pattern.compose(...)
Use the appliesOn to specify which block this option should be applied on
Default value: "undefined"
The freezed library has this option enabled by default.
Use this option to enable/disable this option completely.
The plugin by default generates immutable Freezed models using the @freezed decorator.
If this option is configured, the plugin will generate immutable Freezed models using the @Freezed(equal: value) instead.
Setting a boolean value will enable/disable this option globally for every GraphQL Type
but you can also set this option to true for one or more GraphQL Types using a TypeNamePattern.
Default value: "undefined"
Wraps the fields names that are valid Dart keywords with the prefix and suffix given Default value: "true"
This will mark the specified parameters as final Default value: "undefined"
names of GraphQL types to ignore when generating Freezed classes Default value: "undefined"
The freezed library by default generates immutable models decorated with the @freezed decorator.
This option if set to false the plugin will generate mutable Freezed models using the @unfreezed decorator instead.
Setting a boolean value will enable/disable this option globally for every GraphQL Type
but you can also set this option to true for one or more GraphQL Types using a TypeNamePattern.
Default value: "undefined"
allows collections(lists/maps) to be modified even if class is immutable Default value: "undefined"
maps over the value(array of typeNames) and transform each as a named factory constructor inside a class generated for the key(target GraphQL Object Type). Default value: "undefined"
since inputs will be used to collect data, it makes sense to make them mutable with Freezed's @unfreezed decorator.
This overrides(in order words: has a higher precedence than) the immutable config value ONLY for GraphQL input types.
Default value: "true"
if true, defines a private empty constructor to allow getter and methods to work on the class Default value: "true"
customize the key to be used for fromJson with multiple constructors Default value: "undefined"
This plugin generates React-Query Hooks with TypeScript typings.
It extends the basic TypeScript plugins: @graphql-codegen/typescript, @graphql-codegen/typescript-operations - and thus shares a similar configuration.
If you are using the
react-querypackage instead of the@tanstack/react-querypackage in your project, please set thelegacyModeoption totrue.
29 nested properties
Customize the fetcher you wish to use in the generated file. React-Query is agnostic to the data-fetching layer, so you should provide it, or use a custom one.
The following options are available to use:
- 'fetch' - requires you to specify endpoint and headers on each call, and uses
fetchto do the actual http call. { endpoint: string, fetchParams: RequestInit }: hardcode your endpoint and fetch options into the generated output, using the environmentfetchmethod. You can also useprocess.env.MY_VARas endpoint or header value.file#identifier- You can use custom fetcher method that should implement the exportedReactQueryFetcherinterface. Example:./my-fetcher#myCustomFetcher.graphql-request: Will generate each hook withclientargument, where you should pass your ownGraphQLClient(created fromgraphql-request).
For each generate query hook adds document field with a
corresponding GraphQL query. Useful for queryClient.fetchQuery.
Default value: "false"
For each generate query hook adds getKey(variables: QueryVariables) function. Useful for cache updates. If addInfiniteQuery is true, it will also add a getKey function to each infinite query. Default value: "false"
For each generate mutation hook adds getKey() function. Useful for call outside of functional component. Default value: "false"
For each generate query hook adds fetcher field with a corresponding GraphQL query using the fetcher.
It is useful for queryClient.fetchQuery and queryClient.prefetchQuery.
Default value: "false"
Changes the default "TError" generic type. Default value: "unknown"
Adds an Infinite Query along side the standard one Default value: "false"
If false, it will work with @tanstack/react-query, default value is true.
Default value: "true"
Adds a suffix to generated operation result type names Default value: ""
Set this configuration to true if you wish to make sure to remove duplicate operation name suffix.
Default value: "false"
Set this configuration to true if you wish to disable auto add suffix of operation name, like Query, Mutation, Subscription, Fragment.
Default value: "false"
Changes the GraphQL operations variables prefix. Default value: ""
Changes the GraphQL operations variables suffix. Default value: "Document"
Changes the GraphQL fragments variables prefix. Default value: ""
Changes the GraphQL fragments variables suffix. Default value: "FragmentDoc"
This config adds PURE magic comment to the static variables to enforce treeshaking for your bundler. Default value: "false"
If you are using documentNode: documentMode | documentNodeImportFragments, you can set this to true to apply document optimizations for your GraphQL document.
This will remove all "loc" and "description" fields from the compiled document, and will remove all empty arrays (such as directives, arguments and variableDefinitions).
Default value: "true"
If set to true, it will enable support for parsing variables on fragments. Default value: "false"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Removes fragment duplicates for reducing data transfer. It is done by removing sub-fragments imports from fragment definition Instead - all of them are imported to the Operation node. Default value: "false"
5 nested properties
Define where to import the base api to inject endpoints into
Change the import name of the baseApi from default 'api' Default value: "'api'"
Whether to export React Hooks from the generated api. Enable only when using the "@reduxjs/toolkit/query/react" import of createApi
Default value: "false"
Sets the overrideExisting option, for example to allow for hot module reloading when running graphql-codegen in watch mode.
Will directly be injected as code.
Default value: "undefined"
Sets the addTransformResponse option, which will automatically add a types transformResponse for query
Default value: "false"
This plugin generate a generic SDK (without any Requester implemented), allow you to easily customize the way you fetch your data, without loosing the strongly-typed integration.
33 nested properties
usingObservableFrom: import Observable from 'zen-observable'
OR
usingObservableFrom: import { Observable } from 'rxjs'
By default the request method return the data or errors key from the response. If you need to access the extensions key you can use the rawRequest method.
Default value: "false"
Customize from which module will gql be imported from.
This is useful if you want to use modules other than graphql-tag, e.g. graphql.macro.
Default value: "graphql-tag#gql"
Customize from which module will DocumentNode be imported from.
This is useful if you want to use modules other than graphql, e.g. @graphql-typed-document-node.
Default value: "graphql#DocumentNode"
Set this configuration to true if you wish to tell codegen to generate code with no export identifier.
Default value: "false"
Set this configuration to true if you wish to make sure to remove duplicate operation name suffix.
Default value: "false"
Set this configuration to true if you wish to disable auto add suffix of operation name, like Query, Mutation, Subscription, Fragment.
Default value: "false"
Adds a suffix to generated operation result type names Default value: ""
Changes the GraphQL operations variables prefix. Default value: ""
Changes the GraphQL operations variables suffix. Default value: "Document"
Changes the GraphQL fragments variables prefix. Default value: ""
Changes the GraphQL fragments variables suffix. Default value: "FragmentDoc"
If you are using documentMode: documentNode | documentNodeImportFragments, you can set this to true to apply document optimizations for your GraphQL document.
This will remove all "loc" and "description" fields from the compiled document, and will remove all empty arrays (such as directives, arguments and variableDefinitions).
Default value: "true"
This config is used internally by presets, but you can use it manually to tell codegen to prefix all base types that it's using.
This is useful if you wish to generate base types from typescript-operations plugin into a different file, and import it from there.
Default value: ""
This config should be used if documentMode is external. This has 2 usage:
- any string: This would be the path to import document nodes from. This can be used if we want to manually create the document nodes e.g. Use
graphql-tagin a separate file and export the generated document - 'near-operation-file': This is a special mode that is intended to be used with
near-operation-filepreset to import document nodes from those files. If these files are.graphqlfiles, we make use of webpack loader. Default value: ""
This config adds PURE magic comment to the static variables to enforce treeshaking for your bundler. Default value: "false"
If set to true, it will enable support for parsing variables on fragments. Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
3 nested properties
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Remove optional sign from all keyFields fields.
Default value: "false"
Remove optional sign from all generated keys of the root TypePolicy. Default value: "false"
2 nested properties
Allow you to choose where to add the content. Default value: "prepend"
The actual content you wish to add, either a string or array of strings. You can also specify a path to a local file and the content if it will be loaded by codegen.
2 nested properties
Customize the Moment format of the output time. Default value: "YYYY-MM-DDTHH:mm:ssZ"
Customize the comment message Default value: "'Generated on'"
This plugin generates the base TypeScript types, based on your GraphQL schema.
The types generated by this plugin are simple, and refers to the exact structure of your schema, and it's used as the base types for other plugins (such as typescript-operations / typescript-resolvers)
43 nested properties
This will cause the generator to avoid using TypeScript optionals (?) on types,
so the following definition: type A { myField: String } will output myField: Maybe<string>
instead of myField?: Maybe<string>.
Default value: "false"
Will prefix every generated enum with const, you can read more about const enums here: https://www.typescriptlang.org/docs/handbook/enums.html.
Default value: "false"
Generates enum as TypeScript string union type instead of an enum. Useful if you wish to generate .d.ts declaration file instead of .ts, or if you want to avoid using TypeScript enums due to bundle size concerns
Default value: "false"
Controls whether to preserve typescript enum values as numbers Default value: "false"
This option controls whether or not a catch-all entry is added to enum type definitions for values that may be added in the future.
This is useful if you are using relay.
Default value: "false"
This option controls whether or not a catch-all entry is added to union type definitions for values that may be added in the future.
This is useful if you are using relay.
Default value: "false"
Generates enum as TypeScript const assertions instead of enum. This can even be used to enable enum-like patterns in plain JavaScript code if you choose not to use TypeScript’s enum construct.
Default value: "false"
This will cause the generator to emit types for enums only. Default value: "false"
This will cause the generator to emit types for operations only (basically only enums and scalars).
Interacts well with preResolveTypes: true
Default value: "false"
Generates immutable types by adding readonly to properties and uses ReadonlyArray.
Default value: "false"
Allow to override the type value of Maybe.
Default value: "T | null"
Allow to override the type value of Maybe for input types and arguments.
This is useful in case you want to differentiate between the wrapper of input and output types.
By default, this type just refers to Maybe type, but you can override its definition.
Default value: "Maybe
Set to true in order to generate output without export modifier.
This is useful if you are generating .d.ts file and want it to be globally available.
Default value: "false"
Set the value to true in order to disable all description generation.
Default value: "false"
When a GraphQL interface is used for a field, this flag will use the implementing types, instead of the interface itself. Default value: "false"
Set to true in order to wrap field definitions with EntireFieldWrapper.
This is useful to allow return types such as Promises and functions for fields.
Differs from wrapFieldDefinitions in that this wraps the entire field definition if i.e. the field is an Array, while
wrapFieldDefinitions will wrap every single value inside the array.
Default value: "false"
Allow to override the type value of EntireFieldWrapper. This wrapper applies outside of Array and Maybe
unlike fieldWrapperValue, that will wrap the inner type.
Default value: "T | Promise
Allow using enum string values directly.
Adds _ to generated Args types in order to avoid duplicate identifiers.
A raw configuration for enumValues map - can be represented with a single string value for a file path, a map between enum name and a file path, or a map between enum name and an object with explicit enum values.
Overrides the default output for various GraphQL elements.
Allow you to disable prefixing for generated enums, works in combination with typesPrefix.
Default value: "true"
Allow you to disable suffixing for generated enums, works in combination with typesSuffix.
Default value: "true"
Allow you to add wrapper for field type, use T as the generic value. Make sure to set wrapFieldDefinitions to true in order to make this flag work.
Default value: "T"
Set to true in order to wrap field definitions with FieldWrapper.
This is useful to allow return types such as Promises and functions.
Default value: "false"
This will cause the generator to ignore enum values defined in GraphQLSchema Default value: "false"
Adds a suffix to the imported names to prevent name clashes.
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin generates TypeScript types based on your GraphQLSchema and your GraphQL operations and fragments. It generates types for your GraphQL documents: Query, Mutation, Subscription and Fragment.
Note: In most configurations, this plugin requires you to use `typescript as well, because it depends on its base types.
49 nested properties
The GraphQL spec
allows arrays and a single primitive value for list input. This allows to
deactivate that behavior to only accept arrays instead of single values. If
set to false, the definition: query foo(bar: [Int!]!): Foo will output
bar: Array<Int> instead of bar: Array<Int> | Int for the variable part.
Default value: "true"
This will cause the generator to avoid using TypeScript optionals (?) on types,
so the following definition: type A { myField: String } will output myField: Maybe<string>
instead of myField?: Maybe<string>.
Default value: "false"
Generates immutable types by adding readonly to properties and uses ReadonlyArray.
Default value: "false"
Flatten fragment spread and inline fragments into a simple selection set before generating. Default value: "false"
Include all fragments types when flattenGeneratedTypes is enabled. Default value: "false"
Set to true in order to generate output without export modifier.
This is useful if you are generating .d.ts file and want it to be globally available.
Default value: "false"
Add const export of the operation name to output file. Pay attention that the file should be d.ts.
You can combine it with near-operation-file preset and therefore the types will be generated along with graphql file. Then you need to set extension in presetConfig to be .gql.d.ts and by that you can import gql file in ts files.
It will allow you to get everything with one import:
import { GetClient, GetClientQuery, GetClientQueryVariables } from './GetClient.gql.js'
Default value: "false"
Allow to override the type value of Maybe.
Default value: "T | null"
Adds undefined as a possible type for query variables Default value: "false"
Options related to handling nullability
1 nested properties
Uses primitive types where possible.
Set to false in order to use Pick and take use the types generated by typescript plugin.
Default value: "true"
Avoid adding __typename for root types. This is ignored when a selection explicitly specifies __typename.
Default value: "false"
Adds a suffix to generated operation result type names Default value: ""
Set this configuration to true if you wish to make sure to remove duplicate operation name suffix.
Default value: "false"
Set this configuration to true if you wish to disable auto add suffix of operation name, like Query, Mutation, Subscription, Fragment.
Default value: "false"
If set to true, it will export the sub-types created in order to make it easier to access fields declared under fragment spread. Default value: "false"
If set to true, it will enable support for parsing variables on fragments. Default value: "false"
If set to true, merge equal fragment interfaces. Default value: "false"
1 nested properties
Adds integration with Apollo Client's @unmask directive
when using Apollo Client's data masking feature. @unmask ensures fields
marked by @unmask are available in the type definition.
Default value: "false"
Adds _ to generated Args types in order to avoid duplicate identifiers.
A raw configuration for enumValues map - can be represented with a single string value for a file path, a map between enum name and a file path, or a map between enum name and an object with explicit enum values.
Overrides the default output for various GraphQL elements.
Allow you to disable prefixing for generated enums, works in combination with typesPrefix.
Default value: "true"
Allow you to disable suffixing for generated enums, works in combination with typesSuffix.
Default value: "true"
Allow you to add wrapper for field type, use T as the generic value. Make sure to set wrapFieldDefinitions to true in order to make this flag work.
Default value: "T"
Set to true in order to wrap field definitions with FieldWrapper.
This is useful to allow return types such as Promises and functions.
Default value: "false"
This will cause the generator to emit types for enums only Default value: "false"
This will cause the generator to emit types for operations only (basically only enums and scalars) Default value: "false"
This will cause the generator to ignore enum values defined in GraphQLSchema Default value: "false"
Set to true in order to wrap field definitions with EntireFieldWrapper.
This is useful to allow return types such as Promises and functions for fields.
Differs from wrapFieldDefinitions in that this wraps the entire field definition if i.e. the field is an Array, while
wrapFieldDefinitions will wrap every single value inside the array.
Default value: "true"
Allow to override the type value of EntireFieldWrapper. This wrapper applies outside of Array and Maybe
unlike fieldWrapperValue, that will wrap the inner type.
Default value: "T | Promise
Adds a suffix to the imported names to prevent name clashes.
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin generates C# class identifier for your schema types.
23 nested properties
A raw configuration for enumValues map - can be represented with a single string value for a file path, a map between enum name and a file path, or a map between enum name and an object with explicit enum values.
Allow you to customize the namespace name. Default value: "GraphQLCodeGen"
Allow you to customize the parent class name. Default value: "Types"
Allow you to customize the list type Default value: "IEnumerable"
Emit C# 9.0+ records instead of classes Default value: "false"
Should JSON attributes be emitted for produced types and properties ot not Default value: "true"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin generates C# class based on your GraphQL operations.
39 nested properties
Allow you to customize the namespace name. Default value: "GraphQLCodeGen"
Defined the global value of namedClient.
Allows to define a custom suffix for query operations. Default value: "GQL"
Allows to define a custom suffix for mutation operations. Default value: "GQL"
Allows to define a custom suffix for Subscription operations. Default value: "GQL"
Allows to generate operation methods with class definitions for request/response parameters Default value: "false"
Customize from which module will gql be imported from.
This is useful if you want to use modules other than graphql-tag, e.g. graphql.macro.
Default value: "graphql-tag#gql"
Customize from which module will DocumentNode be imported from.
This is useful if you want to use modules other than graphql, e.g. @graphql-typed-document-node.
Default value: "graphql#DocumentNode"
Set this configuration to true if you wish to tell codegen to generate code with no export identifier.
Default value: "false"
Set this configuration to true if you wish to make sure to remove duplicate operation name suffix.
Default value: "false"
Set this configuration to true if you wish to disable auto add suffix of operation name, like Query, Mutation, Subscription, Fragment.
Default value: "false"
Adds a suffix to generated operation result type names Default value: ""
Changes the GraphQL operations variables prefix. Default value: ""
Changes the GraphQL operations variables suffix. Default value: "Document"
Changes the GraphQL fragments variables prefix. Default value: ""
Changes the GraphQL fragments variables suffix. Default value: "FragmentDoc"
If you are using documentMode: documentNode | documentNodeImportFragments, you can set this to true to apply document optimizations for your GraphQL document.
This will remove all "loc" and "description" fields from the compiled document, and will remove all empty arrays (such as directives, arguments and variableDefinitions).
Default value: "true"
This config is used internally by presets, but you can use it manually to tell codegen to prefix all base types that it's using.
This is useful if you wish to generate base types from typescript-operations plugin into a different file, and import it from there.
Default value: ""
This config should be used if documentMode is external. This has 2 usage:
- any string: This would be the path to import document nodes from. This can be used if we want to manually create the document nodes e.g. Use
graphql-tagin a separate file and export the generated document - 'near-operation-file': This is a special mode that is intended to be used with
near-operation-filepreset to import document nodes from those files. If these files are.graphqlfiles, we make use of webpack loader. Default value: ""
This config adds PURE magic comment to the static variables to enforce treeshaking for your bundler. Default value: "false"
If set to true, it will enable support for parsing variables on fragments. Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin prints the merged schema as string. If multiple schemas are provided, they will be merged and printed as one schema.
5 nested properties
Include directives to Schema output. Default value: "false"
Include introspection types to Schema output. Default value: "false"
Set to true in order to print description as comments (using # instead of """)
Default value: "false"
Set to false to disable sorting Default value: "true"
41 nested properties
Specifies the objects that will have TypeGraphQL decorators prepended to them, by name. Non-matching types will still be output, but without decorators. If not set, all types will be decorated.
This will cause the generator to avoid using TypeScript optionals (?) on types,
so the following definition: type A { myField: String } will output myField: Maybe<string>
instead of myField?: Maybe<string>.
Default value: "false"
Will prefix every generated enum with const, you can read more about const enums here: https://www.typescriptlang.org/docs/handbook/enums.html.
Default value: "false"
Generates enum as TypeScript string union type instead of an enum. Useful if you wish to generate .d.ts declaration file instead of .ts, or if you want to avoid using TypeScript enums due to bundle size concerns
Default value: "false"
Controls whether to preserve typescript enum values as numbers Default value: "false"
This option controls whether or not a catch-all entry is added to enum type definitions for values that may be added in the future.
This is useful if you are using relay.
Default value: "false"
This option controls whether or not a catch-all entry is added to union type definitions for values that may be added in the future.
This is useful if you are using relay.
Default value: "false"
Generates enum as TypeScript const assertions instead of enum. This can even be used to enable enum-like patterns in plain JavaScript code if you choose not to use TypeScript’s enum construct.
Default value: "false"
This will cause the generator to emit types for enums only. Default value: "false"
This will cause the generator to emit types for operations only (basically only enums and scalars).
Interacts well with preResolveTypes: true
Default value: "false"
Generates immutable types by adding readonly to properties and uses ReadonlyArray.
Default value: "false"
Allow to override the type value of Maybe.
Default value: "T | null"
Allow to override the type value of Maybe for input types and arguments.
This is useful in case you want to differentiate between the wrapper of input and output types.
By default, this type just refers to Maybe type, but you can override its definition.
Default value: "Maybe
Set to true in order to generate output without export modifier.
This is useful if you are generating .d.ts file and want it to be globally available.
Default value: "false"
Set the value to true in order to disable all description generation.
Default value: "false"
When a GraphQL interface is used for a field, this flag will use the implementing types, instead of the interface itself. Default value: "false"
Set to true in order to wrap field definitions with EntireFieldWrapper.
This is useful to allow return types such as Promises and functions for fields.
Differs from wrapFieldDefinitions in that this wraps the entire field definition if i.e. the field is an Array, while
wrapFieldDefinitions will wrap every single value inside the array.
Default value: "false"
Allow to override the type value of EntireFieldWrapper. This wrapper applies outside of Array and Maybe
unlike fieldWrapperValue, that will wrap the inner type.
Default value: "T | Promise
Allow using enum string values directly.
Adds _ to generated Args types in order to avoid duplicate identifiers.
A raw configuration for enumValues map - can be represented with a single string value for a file path, a map between enum name and a file path, or a map between enum name and an object with explicit enum values.
Overrides the default output for various GraphQL elements.
Allow you to disable prefixing for generated enums, works in combination with typesPrefix.
Default value: "true"
Allow you to add wrapper for field type, use T as the generic value. Make sure to set wrapFieldDefinitions to true in order to make this flag work.
Default value: "T"
Set to true in order to wrap field definitions with FieldWrapper.
This is useful to allow return types such as Promises and functions.
Default value: "false"
This will cause the generator to ignore enum values defined in GraphQLSchema Default value: "false"
Adds a suffix to the imported names to prevent name clashes.
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Removes fragment duplicates for reducing data transfer. It is done by removing sub-fragments imports from fragment definition Instead - all of them are imported to the Operation node. Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
This plugin generates TypeScript typings for .graphql files containing GraphQL documents, which later on can be consumed using graphql-tag/loader or use string types if you will use the operations as raw strings, and get type-check and type-safety for your imports. This means that any time you import objects from .graphql files, your IDE will provide auto-complete.
This plugin also handles .graphql files containing multiple GraphQL documents, and name the imports according to the operation name.
âš Fragments are not generated with named imports, only as default imports, due to
graphql-tag/loaderbehavior.
4 nested properties
Allows specifying a module definition path prefix to provide distinction between generated types. Default value: ""
By default, only the filename is being used to generate TS module declarations. Setting this to true will generate it with a full path based on the CWD.
Default value: "false"
By default, a wildcard is being added as prefix, you can change that to a custom prefix Default value: "*/"
By default, the named exports will have a type DocumentNode. Change this to "string" if you only use raw strings.
Default value: "DocumentNode"
3 nested properties
Allow you to customize the name of the exported identifier Default value: "namedOperations"
Will generate a const string instead of regular string. Default value: "false"
Throws an error if a duplicate operation name is found. Default value: "false"
This plugin generates graphql-request ready-to-use SDK, which is fully-typed.
33 nested properties
By default, the request method return the data or errors key from the response. If you need to access the extensions key you can use the rawRequest method.
Default value: "false"
Allows you to override the type for extensions when rawRequest is enabled.
Default value: "any"
Customize from which module will gql be imported from.
This is useful if you want to use modules other than graphql-tag, e.g. graphql.macro.
Default value: "graphql-tag#gql"
Customize from which module will DocumentNode be imported from.
This is useful if you want to use modules other than graphql, e.g. @graphql-typed-document-node.
Default value: "graphql#DocumentNode"
Set this configuration to true if you wish to tell codegen to generate code with no export identifier.
Default value: "false"
Set this configuration to true if you wish to make sure to remove duplicate operation name suffix.
Default value: "false"
Set this configuration to true if you wish to disable auto add suffix of operation name, like Query, Mutation, Subscription, Fragment.
Default value: "false"
Adds a suffix to generated operation result type names Default value: ""
Changes the GraphQL operations variables prefix. Default value: ""
Changes the GraphQL operations variables suffix. Default value: "Document"
Changes the GraphQL fragments variables prefix. Default value: ""
Changes the GraphQL fragments variables suffix. Default value: "FragmentDoc"
If you are using documentMode: documentNode | documentNodeImportFragments, you can set this to true to apply document optimizations for your GraphQL document.
This will remove all "loc" and "description" fields from the compiled document, and will remove all empty arrays (such as directives, arguments and variableDefinitions).
Default value: "true"
This config is used internally by presets, but you can use it manually to tell codegen to prefix all base types that it's using.
This is useful if you wish to generate base types from typescript-operations plugin into a different file, and import it from there.
Default value: ""
This config should be used if documentMode is external. This has 2 usage:
- any string: This would be the path to import document nodes from. This can be used if we want to manually create the document nodes e.g. Use
graphql-tagin a separate file and export the generated document - 'near-operation-file': This is a special mode that is intended to be used with
near-operation-filepreset to import document nodes from those files. If these files are.graphqlfiles, we make use of webpack loader. Default value: ""
This config adds PURE magic comment to the static variables to enforce treeshaking for your bundler. Default value: "false"
If set to true, it will enable support for parsing variables on fragments. Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
21 nested properties
Customize the suffix for the generated GraphQL types.
Default value: "DbObject"
Customize the suffix for the generated GraphQL interfaces.
Default value: "DbObject"
Customize the type of _id fields. You can either specify a type name, or specify module#type.
Default value: "mongodb#ObjectId"
Customize the name of the id field generated after using @id directive over a GraphQL field.
Default value: "_id"
Replaces generated enum values with string.
Default value: "true"
This will cause the generator to avoid using TypeScript optionals (?),
so the following definition: type A { myField: String } will output myField: Maybe<string>
instead of myField?: Maybe<string>.
Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin generates TypeScript signature for resolve functions of your GraphQL API.
You can use this plugin to generate simple resolvers signature based on your GraphQL types, or you can change its behavior be providing custom model types (mappers).
You can find a blog post explaining the usage of this plugin here: https://the-guild.dev/blog/better-type-safety-for-resolvers-with-graphql-codegen
49 nested properties
Adds an index signature to any generates resolver. Default value: "false"
Disables/Enables Schema Stitching support.
By default, the resolver signature does not include the support for schema-stitching.
Set to false to enable that.
Default value: "true"
Set to true in order to wrap field definitions with FieldWrapper.
This is useful to allow return types such as Promises and functions. Needed for
compatibility with federation: true when
Default value: "true"
You can provide your custom GraphQLResolveInfo instead of the default one from graphql-js Default value: "graphql#GraphQLResolveInfo"
You can provide your custom ResolveFn instead the default. It has to be a type that uses the generics <TResult, TParent, TContext, TArgs>
Default value: "(parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo) => Promise
Allow you to override the ParentType generic in each resolver, by avoid enforcing the base type of the generated generic type.
This will generate ParentType = Type instead of ParentType extends Type = Type in each resolver.
Sets info argument of resolver function to be optional field. Useful for testing.
Set to true in order to allow the Resolver type to be callable
Adds _ to generated Args types in order to avoid duplicate identifiers.
Use this configuration to set a custom type for your context, and it will
affect all the resolvers, without the need to override it using generics each time.
If you wish to use an external type and import it from another file, you can use add plugin
and add the required import statement, or you can use a module#type syntax.
Use this configuration to set a custom type for the rootValue, and it will
affect resolvers of all root types (Query, Mutation and Subscription), without the need to override it using generics each time.
If you wish to use an external type and import it from another file, you can use add plugin
and add the required import statement, or you can use both module#type or module#namespace#type syntax.
Adds a suffix to the imported names to prevent name clashes.
Replaces a GraphQL type usage with a custom type, allowing you to return custom object from
your resolvers.
You can use both module#type and module#namespace#type syntax.
Allow you to set the default mapper when it's not being override by mappers or generics.
You can specify a type name, or specify a string in module#type or module#namespace#type format.
The default value of mappers is the TypeScript type generated by typescript package.
This will cause the generator to avoid using optionals (?),
so all field resolvers must be implemented in order to avoid compilation errors.
Default value: "false"
Warns about unused mappers. Default value: "true"
A raw configuration for enumValues map - can be represented with a single string value for a file path, a map between enum name and a file path, or a map between enum name and an object with explicit enum values.
Allow you to override resolverTypeWrapper definition.
Default value: "Promise
Supports Apollo Federation Default value: "false"
Allow you to disable prefixing for generated enums, works in combination with typesPrefix.
Default value: "true"
Allow you to disable suffixing for generated enums, works in combination with typesSuffix.
Default value: "true"
Configures behavior for custom directives from various GraphQL libraries.
1 nested properties
Sets the __resolveType field as optional field.
Default value: "false"
Generates immutable types by adding readonly to properties and uses ReadonlyArray.
Default value: "false"
Prefixes all GraphQL related generated types with that value, as namespaces import. You can use this feature to allow separation of plugins to different files. Default value: "''"
Suffix we add to each generated type resolver. Default value: "Resolvers"
The type name to use when exporting all resolvers signature as unified type. Default value: "Resolvers"
Defines the prefix value used for __resolveType and __isTypeOf resolvers.
If you are using mercurius-js, please set this field to empty string for better compatibility.
Default value: "'__'"
Makes __typename of resolver mappings non-optional without affecting the base types.
Default value: "false"
If true, recursively goes through all object type's fields, checks if they have abstract types and generates expected types correctly.
This may not work for cases where provided default mapper types are also nested e.g. defaultMapper: DeepPartial<{T}> or defaultMapper: Partial<{T}>.
Default value: "false"
If true, add field resolver types to Interfaces. By default, GraphQL Interfaces do not trigger any field resolvers, meaning every implementing type must implement the same resolver for the shared fields.
Some tools provide a way to change the default behaviour by making GraphQL Objects inherit missing resolvers from their Interface types. In these cases, it is fine to turn this option to true.
For example, if you are using @graphql-tools/schema#makeExecutableSchema with inheritResolversFromInterfaces: true,
you can make addInterfaceFieldResolverTypes: true as well
https://the-guild.dev/graphql/tools/docs/generate-schema#makeexecutableschema
Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin generates Apollo services (Query, Mutation and Subscription) with TypeScript typings.
It will generate a strongly typed Angular service for every defined query, mutation or subscription. The generated Angular services are ready to inject and use within your Angular component.
It extends the basic TypeScript plugins: @graphql-codegen/typescript, @graphql-codegen/typescript-operations - and thus shares a similar configuration.
To shed some more light regards this template, it's recommended to go through this article: https://apollo-angular.com/docs/get-started, and to read the Code Generation with Apollo Angular: https://the-guild.dev/blog/apollo-angular-12
44 nested properties
Version of apollo-angular package
Default value: "2"
Allows to define ngModule as part of the plugin's config so it's globally available.
Defined the global value of namedClient.
Defined the global value of serviceName.
Defined the global value of serviceProvidedInRoot.
Define the Injector of the SDK class.
Set to true in order to generate a SDK service class that uses all generated services.
Default value: "false"
Allows to define a custom suffix for query operations. Default value: "GQL"
Allows to define a custom suffix for mutation operations. Default value: "GQL"
Allows to define a custom suffix for Subscription operations. Default value: "GQL"
Allows to define a custom Apollo-Angular package to import types from. Default value: "'apollo-angular'"
Add additional dependency injections for generated services Default value: ""
Add override modifier to make the generated code compatible with the noImplicitOverride option of Typescript v4.3+.
Default value: "false"
Customize from which module will gql be imported from.
This is useful if you want to use modules other than graphql-tag, e.g. graphql.macro.
Default value: "graphql-tag#gql"
Customize from which module will DocumentNode be imported from.
This is useful if you want to use modules other than graphql, e.g. @graphql-typed-document-node.
Default value: "graphql#DocumentNode"
Set this configuration to true if you wish to tell codegen to generate code with no export identifier.
Default value: "false"
Set this configuration to true if you wish to make sure to remove duplicate operation name suffix.
Default value: "false"
Set this configuration to true if you wish to disable auto add suffix of operation name, like Query, Mutation, Subscription, Fragment.
Default value: "false"
Adds a suffix to generated operation result type names Default value: ""
Changes the GraphQL operations variables prefix. Default value: ""
Changes the GraphQL operations variables suffix. Default value: "Document"
Changes the GraphQL fragments variables prefix. Default value: ""
Changes the GraphQL fragments variables suffix. Default value: "FragmentDoc"
If you are using documentMode: documentNode | documentNodeImportFragments, you can set this to true to apply document optimizations for your GraphQL document.
This will remove all "loc" and "description" fields from the compiled document, and will remove all empty arrays (such as directives, arguments and variableDefinitions).
Default value: "true"
This config is used internally by presets, but you can use it manually to tell codegen to prefix all base types that it's using.
This is useful if you wish to generate base types from typescript-operations plugin into a different file, and import it from there.
Default value: ""
This config should be used if documentMode is external. This has 2 usage:
- any string: This would be the path to import document nodes from. This can be used if we want to manually create the document nodes e.g. Use
graphql-tagin a separate file and export the generated document - 'near-operation-file': This is a special mode that is intended to be used with
near-operation-filepreset to import document nodes from those files. If these files are.graphqlfiles, we make use of webpack loader. Default value: ""
This config adds PURE magic comment to the static variables to enforce treeshaking for your bundler. Default value: "false"
If set to true, it will enable support for parsing variables on fragments. Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin generates the Typescript schema that enables queries and mutations to be typed in the Nhost SDK.
1 nested properties
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
This plugin generates urql (https://github.com/FormidableLabs/urql) components and HOC with TypeScript typings.
34 nested properties
Customized the output by enabling/disabling the generated Component. Default value: "false"
Customized the output by enabling/disabling the generated React Hooks. Default value: "true"
You can specify module that exports components Query, Mutation, Subscription and HOCs
This is useful for further abstraction of some common tasks (e.g. error handling).
Filepath relative to generated file can be also specified.
Default value: "urql"
Customize from which module will gql be imported from.
This is useful if you want to use modules other than graphql-tag, e.g. graphql.macro.
Default value: "graphql-tag#gql"
Customize from which module will DocumentNode be imported from.
This is useful if you want to use modules other than graphql, e.g. @graphql-typed-document-node.
Default value: "graphql#DocumentNode"
Set this configuration to true if you wish to tell codegen to generate code with no export identifier.
Default value: "false"
Set this configuration to true if you wish to make sure to remove duplicate operation name suffix.
Default value: "false"
Set this configuration to true if you wish to disable auto add suffix of operation name, like Query, Mutation, Subscription, Fragment.
Default value: "false"
Adds a suffix to generated operation result type names Default value: ""
Changes the GraphQL operations variables prefix. Default value: ""
Changes the GraphQL operations variables suffix. Default value: "Document"
Changes the GraphQL fragments variables prefix. Default value: ""
Changes the GraphQL fragments variables suffix. Default value: "FragmentDoc"
If you are using documentMode: documentNode | documentNodeImportFragments, you can set this to true to apply document optimizations for your GraphQL document.
This will remove all "loc" and "description" fields from the compiled document, and will remove all empty arrays (such as directives, arguments and variableDefinitions).
Default value: "true"
This config is used internally by presets, but you can use it manually to tell codegen to prefix all base types that it's using.
This is useful if you wish to generate base types from typescript-operations plugin into a different file, and import it from there.
Default value: ""
This config should be used if documentMode is external. This has 2 usage:
- any string: This would be the path to import document nodes from. This can be used if we want to manually create the document nodes e.g. Use
graphql-tagin a separate file and export the generated document - 'near-operation-file': This is a special mode that is intended to be used with
near-operation-filepreset to import document nodes from those files. If these files are.graphqlfiles, we make use of webpack loader. Default value: ""
This config adds PURE magic comment to the static variables to enforce treeshaking for your bundler. Default value: "false"
If set to true, it will enable support for parsing variables on fragments. Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin generates React Apollo components and HOC with TypeScript typings.
It extends the basic TypeScript plugins: @graphql-codegen/typescript, @graphql-codegen/typescript-operations - and thus shares a similar configuration.
48 nested properties
Customize the output by enabling/disabling the generated Component (deprecated since Apollo-Client v3). For more details: https://apollographql.com/docs/react/api/react/components Default value: "false"
Customize the output by enabling/disabling the HOC (deprecated since Apollo-Client v3). For more details: https://apollographql.com/docs/react/api/react/hoc Default value: "false"
Customized the output by enabling/disabling the generated React Hooks. For more details: https://apollographql.com/docs/react/api/react/hooks Default value: "true"
Customized the output by enabling/disabling the generated mutation function signature. Default value: "true"
Enable generating a function to be used with refetchQueries Default value: "false"
Customize the package where apollo-react common lib is loaded from. Default value: "@apollo/react-common"
Customize the package where apollo-react component lib is loaded from. Default value: "@apollo/react-components"
Customize the package where apollo-react HOC lib is loaded from. Default value: "@apollo/react-hoc"
Customize the package where apollo-react hooks lib is loaded from. Default value: "@apollo/react-hooks"
You can specify a suffix that gets attached to the name of the generated component. Default value: "Component"
Sets the version of react-apollo.
If you are using the old (deprecated) package of react-apollo, please set this configuration to 2.
If you are using Apollo-Client v3, please set this to 3.
Default value: "3"
Customized the output by enabling/disabling the generated result type. Default value: "true"
Customized the output by enabling/disabling the generated mutation option type. Default value: "true"
Whether or not to include wrappers for Apollo's useFragment hook. Default value: "false"
Allows you to enable/disable the generation of docblocks in generated code. Some IDE's (like VSCode) add extra inline information with docblocks, you can disable this feature if your preferred IDE does not. Default value: "true"
7 nested properties
Customize from which module will gql be imported from.
This is useful if you want to use modules other than graphql-tag, e.g. graphql.macro.
Default value: "graphql-tag#gql"
Customize from which module will DocumentNode be imported from.
This is useful if you want to use modules other than graphql, e.g. @graphql-typed-document-node.
Default value: "graphql#DocumentNode"
Set this configuration to true if you wish to tell codegen to generate code with no export identifier.
Default value: "false"
Set this configuration to true if you wish to make sure to remove duplicate operation name suffix.
Default value: "false"
Set this configuration to true if you wish to disable auto add suffix of operation name, like Query, Mutation, Subscription, Fragment.
Default value: "false"
Adds a suffix to generated operation result type names Default value: ""
Changes the GraphQL operations variables prefix. Default value: ""
Changes the GraphQL operations variables suffix. Default value: "Document"
Changes the GraphQL fragments variables prefix. Default value: ""
Changes the GraphQL fragments variables suffix. Default value: "FragmentDoc"
If you are using documentMode: documentNode | documentNodeImportFragments, you can set this to true to apply document optimizations for your GraphQL document.
This will remove all "loc" and "description" fields from the compiled document, and will remove all empty arrays (such as directives, arguments and variableDefinitions).
Default value: "true"
This config is used internally by presets, but you can use it manually to tell codegen to prefix all base types that it's using.
This is useful if you wish to generate base types from typescript-operations plugin into a different file, and import it from there.
Default value: ""
This config should be used if documentMode is external. This has 2 usage:
- any string: This would be the path to import document nodes from. This can be used if we want to manually create the document nodes e.g. Use
graphql-tagin a separate file and export the generated document - 'near-operation-file': This is a special mode that is intended to be used with
near-operation-filepreset to import document nodes from those files. If these files are.graphqlfiles, we make use of webpack loader. Default value: ""
This config adds PURE magic comment to the static variables to enforce treeshaking for your bundler. Default value: "false"
If set to true, it will enable support for parsing variables on fragments. Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin generates
36 nested properties
Customized the output by enabling/disabling the generated Vue composition functions. Default value: "true"
Default value: ""
Default value: ""
Allows you to enable/disable the generation of docblocks in generated code. Some IDE's (like VSCode) add extra inline information with docblocks, you can disable this feature if your preferred IDE does not. Default value: "true"
Allows you to set the clientId in the composition functions when using multiple apollo clients. Default value: "null"
Customize from which module will gql be imported from.
This is useful if you want to use modules other than graphql-tag, e.g. graphql.macro.
Default value: "graphql-tag#gql"
Customize from which module will DocumentNode be imported from.
This is useful if you want to use modules other than graphql, e.g. @graphql-typed-document-node.
Default value: "graphql#DocumentNode"
Set this configuration to true if you wish to tell codegen to generate code with no export identifier.
Default value: "false"
Set this configuration to true if you wish to make sure to remove duplicate operation name suffix.
Default value: "false"
Set this configuration to true if you wish to disable auto add suffix of operation name, like Query, Mutation, Subscription, Fragment.
Default value: "false"
Adds a suffix to generated operation result type names Default value: ""
Changes the GraphQL operations variables prefix. Default value: ""
Changes the GraphQL operations variables suffix. Default value: "Document"
Changes the GraphQL fragments variables prefix. Default value: ""
Changes the GraphQL fragments variables suffix. Default value: "FragmentDoc"
If you are using documentMode: documentNode | documentNodeImportFragments, you can set this to true to apply document optimizations for your GraphQL document.
This will remove all "loc" and "description" fields from the compiled document, and will remove all empty arrays (such as directives, arguments and variableDefinitions).
Default value: "true"
This config is used internally by presets, but you can use it manually to tell codegen to prefix all base types that it's using.
This is useful if you wish to generate base types from typescript-operations plugin into a different file, and import it from there.
Default value: ""
This config should be used if documentMode is external. This has 2 usage:
- any string: This would be the path to import document nodes from. This can be used if we want to manually create the document nodes e.g. Use
graphql-tagin a separate file and export the generated document - 'near-operation-file': This is a special mode that is intended to be used with
near-operation-filepreset to import document nodes from those files. If these files are.graphqlfiles, we make use of webpack loader. Default value: ""
This config adds PURE magic comment to the static variables to enforce treeshaking for your bundler. Default value: "false"
If set to true, it will enable support for parsing variables on fragments. Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin generates Vue Apollo Smart Query, Smart Subscription and mutation operation functions with TypeScript typings.
This plugin relies on some helper functions and types from the vue-apollo-smart-ops package. That package also adds
some optional functionality for improved error handling in Vue Apollo operations which can be configured in the
generated code from this plugin.
It extends the basic TypeScript plugins: @graphql-codegen/typescript, @graphql-codegen/typescript-operations -
and thus shares a similar configuration.
40 nested properties
Customize the output by enabling/disabling the generated Vue Apollo Smart Operations functions. Default value: "true"
The typescript-vue-apollo-smart-ops plugin requires three functions that are used to define your
query, subscription and mutation operation functions:
createMutationFunctioncreateSmartQueryOptionsFunctioncreateSmartSubscriptionOptionsFunction
By default, these functions are provided by the vue-apollo-smart-ops package, but you can substitute
your own import path if you want to replace them with other implementations.
Default value: "vue-apollo-smart-ops"
The operation functions generated by typescript-vue-apollo-smart-ops include some functionality for
error handling. This configuration parameter allows you to customise the name of the error type that
will be used. The default is to use ApolloError from the apollo-client package.
Default value: "ApolloError"
The operation functions generated by typescript-vue-apollo-smart-ops include some functionality for
error handling. This configuration parameter allows you to customise the package where the error type
will be imported from. The default is to use ApolloError from the apollo-client package.
Default value: "vue-apollo-smart-ops"
The operation functions generated by typescript-vue-apollo-smart-ops include some functionality for
error handling. You may supply an error handler function that will be called when an error occurs in
a query, subscription or mutation operation. This function should implement the
ApolloOperationErrorHandlerFunction interface from vue-apollo-smart-ops package. You can
have a custom handler in your app that shows a notification to the user, for example. If unspecified,
this functionality will be disabled and errors handled (or not) by Vue Apollo in the normal way.
Default value: "undefined"
The import path where vueApolloErrorHandlerFunction should be imported from. Can be a package name
or a local file path (anything that works in an import statement).
Default value: "undefined"
The operation functions generated by typescript-vue-apollo-smart-ops include some functionality for
error handling. When an error occurs, the Vue app instance is passed to the error handler. You can
customise the expected type of the app object. For example, a Nuxt.js app might use NuxtApp from
@nuxt/types/app instead. When unspecified, the default type is Vue from vue/types/vue.
Default value: "undefined"
The import path where vueAppType should be imported from. Can be a package name or a local file path
(anything that works in an import statement).
Default value: "undefined"
Allows you to enable/disable the generation of docblocks in generated code. Some IDE's (like VSCode) add extra inline information with docblocks, you can disable this feature if your preferred IDE does not. Default value: "true"
Customize from which module will gql be imported from.
This is useful if you want to use modules other than graphql-tag, e.g. graphql.macro.
Default value: "graphql-tag#gql"
Customize from which module will DocumentNode be imported from.
This is useful if you want to use modules other than graphql, e.g. @graphql-typed-document-node.
Default value: "graphql#DocumentNode"
Set this configuration to true if you wish to tell codegen to generate code with no export identifier.
Default value: "false"
Set this configuration to true if you wish to make sure to remove duplicate operation name suffix.
Default value: "false"
Set this configuration to true if you wish to disable auto add suffix of operation name, like Query, Mutation, Subscription, Fragment.
Default value: "false"
Adds a suffix to generated operation result type names Default value: ""
Changes the GraphQL operations variables prefix. Default value: ""
Changes the GraphQL operations variables suffix. Default value: "Document"
Changes the GraphQL fragments variables prefix. Default value: ""
Changes the GraphQL fragments variables suffix. Default value: "FragmentDoc"
If you are using documentMode: documentNode | documentNodeImportFragments, you can set this to true to apply document optimizations for your GraphQL document.
This will remove all "loc" and "description" fields from the compiled document, and will remove all empty arrays (such as directives, arguments and variableDefinitions).
Default value: "true"
This config is used internally by presets, but you can use it manually to tell codegen to prefix all base types that it's using.
This is useful if you wish to generate base types from typescript-operations plugin into a different file, and import it from there.
Default value: ""
This config should be used if documentMode is external. This has 2 usage:
- any string: This would be the path to import document nodes from. This can be used if we want to manually create the document nodes e.g. Use
graphql-tagin a separate file and export the generated document - 'near-operation-file': This is a special mode that is intended to be used with
near-operation-filepreset to import document nodes from those files. If these files are.graphqlfiles, we make use of webpack loader. Default value: ""
This config adds PURE magic comment to the static variables to enforce treeshaking for your bundler. Default value: "false"
If set to true, it will enable support for parsing variables on fragments. Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin generates urql (https://github.com/FormidableLabs/urql) composition functions with TypeScript typings.
33 nested properties
Customized the output by enabling/disabling the generated Vue Composition functions. Default value: "true"
You can specify module that exports components Query, Mutation, Subscription
This is useful for further abstraction of some common tasks (e.g. error handling).
Filepath relative to generated file can be also specified.
Default value: "urql"
Customize from which module will gql be imported from.
This is useful if you want to use modules other than graphql-tag, e.g. graphql.macro.
Default value: "graphql-tag#gql"
Customize from which module will DocumentNode be imported from.
This is useful if you want to use modules other than graphql, e.g. @graphql-typed-document-node.
Default value: "graphql#DocumentNode"
Set this configuration to true if you wish to tell codegen to generate code with no export identifier.
Default value: "false"
Set this configuration to true if you wish to make sure to remove duplicate operation name suffix.
Default value: "false"
Set this configuration to true if you wish to disable auto add suffix of operation name, like Query, Mutation, Subscription, Fragment.
Default value: "false"
Adds a suffix to generated operation result type names Default value: ""
Changes the GraphQL operations variables prefix. Default value: ""
Changes the GraphQL operations variables suffix. Default value: "Document"
Changes the GraphQL fragments variables prefix. Default value: ""
Changes the GraphQL fragments variables suffix. Default value: "FragmentDoc"
If you are using documentMode: documentNode | documentNodeImportFragments, you can set this to true to apply document optimizations for your GraphQL document.
This will remove all "loc" and "description" fields from the compiled document, and will remove all empty arrays (such as directives, arguments and variableDefinitions).
Default value: "true"
This config is used internally by presets, but you can use it manually to tell codegen to prefix all base types that it's using.
This is useful if you wish to generate base types from typescript-operations plugin into a different file, and import it from there.
Default value: ""
This config should be used if documentMode is external. This has 2 usage:
- any string: This would be the path to import document nodes from. This can be used if we want to manually create the document nodes e.g. Use
graphql-tagin a separate file and export the generated document - 'near-operation-file': This is a special mode that is intended to be used with
near-operation-filepreset to import document nodes from those files. If these files are.graphqlfiles, we make use of webpack loader. Default value: ""
This config adds PURE magic comment to the static variables to enforce treeshaking for your bundler. Default value: "false"
If set to true, it will enable support for parsing variables on fragments. Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin generates Stencil Apollo functional components typings
It extends the basic TypeScript plugins: @graphql-codegen/typescript, @graphql-codegen/typescript-operations - and thus shares a similar configuration.
32 nested properties
Customize from which module will gql be imported from.
This is useful if you want to use modules other than graphql-tag, e.g. graphql.macro.
Default value: "graphql-tag#gql"
Customize from which module will DocumentNode be imported from.
This is useful if you want to use modules other than graphql, e.g. @graphql-typed-document-node.
Default value: "graphql#DocumentNode"
Set this configuration to true if you wish to tell codegen to generate code with no export identifier.
Default value: "false"
Set this configuration to true if you wish to make sure to remove duplicate operation name suffix.
Default value: "false"
Set this configuration to true if you wish to disable auto add suffix of operation name, like Query, Mutation, Subscription, Fragment.
Default value: "false"
Adds a suffix to generated operation result type names Default value: ""
Changes the GraphQL operations variables prefix. Default value: ""
Changes the GraphQL operations variables suffix. Default value: "Document"
Changes the GraphQL fragments variables prefix. Default value: ""
Changes the GraphQL fragments variables suffix. Default value: "FragmentDoc"
If you are using documentMode: documentNode | documentNodeImportFragments, you can set this to true to apply document optimizations for your GraphQL document.
This will remove all "loc" and "description" fields from the compiled document, and will remove all empty arrays (such as directives, arguments and variableDefinitions).
Default value: "true"
This config is used internally by presets, but you can use it manually to tell codegen to prefix all base types that it's using.
This is useful if you wish to generate base types from typescript-operations plugin into a different file, and import it from there.
Default value: ""
This config should be used if documentMode is external. This has 2 usage:
- any string: This would be the path to import document nodes from. This can be used if we want to manually create the document nodes e.g. Use
graphql-tagin a separate file and export the generated document - 'near-operation-file': This is a special mode that is intended to be used with
near-operation-filepreset to import document nodes from those files. If these files are.graphqlfiles, we make use of webpack loader. Default value: ""
This config adds PURE magic comment to the static variables to enforce treeshaking for your bundler. Default value: "false"
If set to true, it will enable support for parsing variables on fragments. Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin generates TypeScript source .ts file from GraphQL files .graphql.
35 nested properties
Adds prefix to the name Default value: ""
Adds suffix to the name Default value: ""
Adds prefix to the fragment variable Default value: ""
Adds suffix to the fragment variable Default value: ""
Customize from which module will gql be imported from.
This is useful if you want to use modules other than graphql-tag, e.g. graphql.macro.
Default value: "graphql-tag#gql"
Customize from which module will DocumentNode be imported from.
This is useful if you want to use modules other than graphql, e.g. @graphql-typed-document-node.
Default value: "graphql#DocumentNode"
Set this configuration to true if you wish to tell codegen to generate code with no export identifier.
Default value: "false"
Set this configuration to true if you wish to make sure to remove duplicate operation name suffix.
Default value: "false"
Set this configuration to true if you wish to disable auto add suffix of operation name, like Query, Mutation, Subscription, Fragment.
Default value: "false"
Adds a suffix to generated operation result type names Default value: ""
Changes the GraphQL operations variables prefix. Default value: ""
Changes the GraphQL operations variables suffix. Default value: "Document"
Changes the GraphQL fragments variables prefix. Default value: ""
Changes the GraphQL fragments variables suffix. Default value: "FragmentDoc"
If you are using documentMode: documentNode | documentNodeImportFragments, you can set this to true to apply document optimizations for your GraphQL document.
This will remove all "loc" and "description" fields from the compiled document, and will remove all empty arrays (such as directives, arguments and variableDefinitions).
Default value: "true"
This config is used internally by presets, but you can use it manually to tell codegen to prefix all base types that it's using.
This is useful if you wish to generate base types from typescript-operations plugin into a different file, and import it from there.
Default value: ""
This config should be used if documentMode is external. This has 2 usage:
- any string: This would be the path to import document nodes from. This can be used if we want to manually create the document nodes e.g. Use
graphql-tagin a separate file and export the generated document - 'near-operation-file': This is a special mode that is intended to be used with
near-operation-filepreset to import document nodes from those files. If these files are.graphqlfiles, we make use of webpack loader. Default value: ""
This config adds PURE magic comment to the static variables to enforce treeshaking for your bundler. Default value: "false"
If set to true, it will enable support for parsing variables on fragments. Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin generates msw (https://github.com/mswjs/msw) mock handlers with TypeScript typings.
1 nested properties
GraphQL endpoint to use when working with multiple backends.
3 nested properties
This plugin and presets creates generated mappers and parsers for a complete type-safe GraphQL requests, for developers that uses Apollo Android runtime.
19 nested properties
Customize the Java package name for the generated operations. The default package name will be generated according to the output file path.
Customize the Java package name for the types generated based on input types.
Customize the Java package name for the fragments generated classes.
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
20 nested properties
Customize the Java package name. The default package name will be generated according to the output file path.
Allow you to replace specific GraphQL types with your custom model classes. This is useful when you want to make sure your resolvers returns the correct class.
The default value is the values set by defaultMapper configuration.
You can use a direct path to the package, or use package#class syntax to have it imported.
Sets the default mapper value in case it's not specified by mappers.
You can use a direct path to the package, or use package#class syntax to have it imported.
The default mapper is Java's Object.
Default value: "Object"
Allow you to customize the parent class name. Default value: "Resolvers"
Allow you to customize the list type. Default value: "Iterable"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
20 nested properties
Customize the Java package name. The default package name will be generated according to the output file path.
Allow you to replace specific GraphQL types with your custom model classes. This is useful when you want to make sure your resolvers returns the correct class.
The default value is the values set by defaultMapper configuration.
You can use a direct path to the package, or use package#class syntax to have it imported.
Sets the default mapper value in case it's not specified by mappers.
You can use a direct path to the package, or use package#class syntax to have it imported.
The default mapper is Java's Object.
Default value: "Object"
Allow you to customize the parent class name. Default value: "Resolvers"
Allow you to customize the list type. Default value: "Iterable"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
20 nested properties
Customize the Java package name. The default package name will be generated according to the output file path.
A raw configuration for enumValues map - can be represented with a single string value for a file path, a map between enum name and a file path, or a map between enum name and an object with explicit enum values.
Allow you to customize the list type Default value: "Iterable"
Allow you to enable generation for the types Default value: "false"
Allow you to omit JvmStatic annotation Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). "mask" transforms the types for use with fragment masking. Useful when masked types are needed when not using the "client" preset e.g. such as combining it with Apollo Client's data masking feature. Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
Append this extension to all imports. Useful for ESM environments that require file extensions in import statements.
Extract all field types to their own types, instead of inlining them. This helps to reduce type duplication, and makes type errors more readable. It can also significantly reduce the size of the generated code, the generation time, and the typechecking time. Default value: "false"
If you prefer to have each field in generated types printed on a new line, set this to true. This can be useful for improving readability of the resulting types, without resorting to running tools like Prettier on the output. Default value: "false"
Whether to include external fragments in the generated code. External fragments are not defined in the same location as the operation definition. Default value: "false"
This plugin generates Flow types based on your GraphQLSchema.
It generates types for your entire schema: types, input types, enum, interface, scalar and union.
27 nested properties
Generates Flow types as Exact types. Default value: "true"
Generates read-only Flow types Default value: "false"
Adds _ to generated Args types in order to avoid duplicate identifiers.
A raw configuration for enumValues map - can be represented with a single string value for a file path, a map between enum name and a file path, or a map between enum name and an object with explicit enum values.
Overrides the default output for various GraphQL elements.
Allow you to disable prefixing for generated enums, works in combination with typesPrefix.
Default value: "true"
Allow you to add wrapper for field type, use T as the generic value. Make sure to set wrapFieldDefinitions to true in order to make this flag work.
Default value: "T"
Set to true in order to wrap field definitions with FieldWrapper.
This is useful to allow return types such as Promises and functions.
Default value: "false"
This will cause the generator to emit types for enums only Default value: "false"
This will cause the generator to emit types for operations only (basically only enums and scalars) Default value: "false"
This will cause the generator to ignore enum values defined in GraphQLSchema Default value: "false"
Set to true in order to wrap field definitions with EntireFieldWrapper.
This is useful to allow return types such as Promises and functions for fields.
Differs from wrapFieldDefinitions in that this wraps the entire field definition if i.e. the field is an Array, while
wrapFieldDefinitions will wrap every single value inside the array.
Default value: "true"
Allow to override the type value of EntireFieldWrapper. This wrapper applies outside of Array and Maybe
unlike fieldWrapperValue, that will wrap the inner type.
Default value: "T | Promise
Adds a suffix to the imported names to prevent name clashes.
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Removes fragment duplicates for reducing data transfer. It is done by removing sub-fragments imports from fragment definition Instead - all of them are imported to the Operation node. Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
This plugin generates resolvers signature based on your GraphQLSchema.
It generates types for your entire schema: types, input types, enum, interface, scalar and union.
This plugin requires you to use @graphql-codegen/flow as well, because it depends on it's types.
33 nested properties
Adds _ to generated Args types in order to avoid duplicate identifiers.
Use this configuration to set a custom type for your context, and it will
affect all the resolvers, without the need to override it using generics each time.
If you wish to use an external type and import it from another file, you can use add plugin
and add the required import statement, or you can use a module#type syntax.
Use this configuration to set a custom type for the rootValue, and it will
affect resolvers of all root types (Query, Mutation and Subscription), without the need to override it using generics each time.
If you wish to use an external type and import it from another file, you can use add plugin
and add the required import statement, or you can use both module#type or module#namespace#type syntax.
Adds a suffix to the imported names to prevent name clashes.
Replaces a GraphQL type usage with a custom type, allowing you to return custom object from
your resolvers.
You can use both module#type and module#namespace#type syntax.
Allow you to set the default mapper when it's not being override by mappers or generics.
You can specify a type name, or specify a string in module#type or module#namespace#type format.
The default value of mappers is the TypeScript type generated by typescript package.
This will cause the generator to avoid using optionals (?),
so all field resolvers must be implemented in order to avoid compilation errors.
Default value: "false"
Warns about unused mappers. Default value: "true"
A raw configuration for enumValues map - can be represented with a single string value for a file path, a map between enum name and a file path, or a map between enum name and an object with explicit enum values.
Allow you to override resolverTypeWrapper definition.
Default value: "Promise
Supports Apollo Federation Default value: "false"
Allow you to disable prefixing for generated enums, works in combination with typesPrefix.
Default value: "true"
Sets the __resolveType field as optional field.
Default value: "false"
Generates immutable types by adding readonly to properties and uses ReadonlyArray.
Default value: "false"
Prefixes all GraphQL related generated types with that value, as namespaces import. You can use this feature to allow separation of plugins to different files. Default value: "''"
Suffix we add to each generated type resolver. Default value: "Resolvers"
The type name to use when exporting all resolvers signature as unified type. Default value: "Resolvers"
Defines the prefix value used for __resolveType and __isTypeOf resolvers.
If you are using mercurius-js, please set this field to empty string for better compatibility.
Default value: "'__'"
Turning this flag to true will generate resolver signature that has only resolveType for interfaces, forcing developers to write inherited type resolvers in the type itself.
Default value: "false"
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Removes fragment duplicates for reducing data transfer. It is done by removing sub-fragments imports from fragment definition Instead - all of them are imported to the Operation node. Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
This plugin generates Flow types based on your GraphQLSchema and your GraphQL operations and fragments.
It generates types for your GraphQL documents: Query, Mutation, Subscription and Fragment.
This plugin requires you to use @graphql-codegen/flow as well, because it depends on its types.
37 nested properties
Generates Flow types as Exact types. Default value: "true"
Generates read-only Flow types Default value: "false"
Flatten fragment spread and inline fragments into a simple selection set before generating. Default value: "false"
Uses primitive types where possible.
Set to false in order to use Pick and take use the types generated by typescript plugin.
Default value: "true"
Avoid adding __typename for root types. This is ignored when a selection explicitly specifies __typename.
Default value: "false"
Puts all generated code under global namespace. Useful for Stencil integration.
Default value: "false"
Adds a suffix to generated operation result type names Default value: ""
Set this configuration to true if you wish to make sure to remove duplicate operation name suffix.
Default value: "false"
Set this configuration to true if you wish to disable auto add suffix of operation name, like Query, Mutation, Subscription, Fragment.
Default value: "false"
If set to true, it will export the sub-types created in order to make it easier to access fields declared under fragment spread. Default value: "false"
If set to true, it will enable support for parsing variables on fragments. Default value: "false"
If set to true, merge equal fragment interfaces. Default value: "false"
Adds _ to generated Args types in order to avoid duplicate identifiers.
A raw configuration for enumValues map - can be represented with a single string value for a file path, a map between enum name and a file path, or a map between enum name and an object with explicit enum values.
Overrides the default output for various GraphQL elements.
Allow you to disable prefixing for generated enums, works in combination with typesPrefix.
Default value: "true"
Allow you to add wrapper for field type, use T as the generic value. Make sure to set wrapFieldDefinitions to true in order to make this flag work.
Default value: "T"
Set to true in order to wrap field definitions with FieldWrapper.
This is useful to allow return types such as Promises and functions.
Default value: "false"
This will cause the generator to emit types for enums only Default value: "false"
This will cause the generator to emit types for operations only (basically only enums and scalars) Default value: "false"
This will cause the generator to ignore enum values defined in GraphQLSchema Default value: "false"
Set to true in order to wrap field definitions with EntireFieldWrapper.
This is useful to allow return types such as Promises and functions for fields.
Differs from wrapFieldDefinitions in that this wraps the entire field definition if i.e. the field is an Array, while
wrapFieldDefinitions will wrap every single value inside the array.
Default value: "true"
Allow to override the type value of EntireFieldWrapper. This wrapper applies outside of Array and Maybe
unlike fieldWrapperValue, that will wrap the inner type.
Default value: "T | Promise
Adds a suffix to the imported names to prevent name clashes.
Makes scalars strict.
If scalars are found in the schema that are not defined in scalars
an error will be thrown during codegen.
Default value: "false"
Allows you to override the type that unknown scalars will have. Default value: "any"
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Prefixes all the generated types. Default value: ""
Suffixes all the generated types. Default value: ""
Does not add __typename to the generated types, unless it was specified in the selection set.
Default value: "false"
Automatically adds __typename field to the generated types, even when they are not specified
in the selection set, and makes it non-optional
Default value: "false"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Removes fragment duplicates for reducing data transfer. It is done by removing sub-fragments imports from fragment definition Instead - all of them are imported to the Operation node. Default value: "false"
Whether fragment types should be inlined into other operations. "inline" is the default behavior and will perform deep inlining fragment types within operation type definitions. "combine" is the previous behavior that uses fragment type references without inlining the types (and might cause issues with deeply nested fragment that uses list types). Default value: "inline"
Emit legacy common js imports.
Default it will be true this way it ensure that generated code works with non-compliant bundlers.
Default value: "true"
This plugin generates a GraphQL introspection file based on your GraphQL schema.
6 nested properties
Set to true in order to minify the JSON output.
Default value: "false"
Whether to include descriptions in the introspection result. Default value: "true"
Whether to include specifiedByUrl in the introspection result.
Default value: "false"
Whether to include isRepeatable flag on directives.
Default value: "true"
Whether to include description field on schema.
Default value: "false"
This plugin generates an introspection file but only with Interfaces and Unions, based on your GraphQLSchema.
If you are using apollo-client and your schema contains interface or union declaration, it's recommended to use Apollo's Fragment Matcher and the result generated by the plugin.
You can read more about it in apollo-client documentation.
Fragment Matcher plugin accepts a TypeScript / JavaScript or a JSON file as an output (.ts, .tsx, .js, .jsx, .json).
Both in TypeScript and JavaScript a default export is being used.
The output is based on the output you choose for the output file name.
5 nested properties
Compatible only with JSON extension, allow you to choose the export type, either module.exports or export default. Allowed values are: commonjs, es2015.
Default value: "es2015"
Compatible only with TS/TSX/JS/JSX extensions, allow you to generate output based on your Apollo Client version. Note: 3 also works for version 4.
Default value: "3"
Create an explicit type based on your schema. This can help IDEs autofill your fragment matcher. This is mostly useful if you do more with your fragment matcher than just pass it to an Apollo-Client. Default value: "false"
When enabled sorts the fragment types lexicographically. This is useful for deterministic output. Default value: "false"
This plugin generates an introspection file for Schema Awareness feature of Urql Cache Exchange
You can read more about it in urql documentation: https://formidable.com/open-source/urql/docs/graphcache/schema-awareness.
Urql Introspection plugin accepts a TypeScript / JavaScript or a JSON file as an output (.ts, .tsx, .js, .jsx, .json).
Both in TypeScript and JavaScript a default export is being used.
The output is based on the output you choose for the output file name.
6 nested properties
Compatible only with JSON extension, allow you to choose the export type, either module.exports or export default. Allowed values are: commonjs, es2015.
Default value: "es2015"
Will use import type {} rather than import {} when importing only types. This gives
compatibility with TypeScript's "importsNotUsedAsValues": "error" option
Default value: "false"
Includes scalar names (instead of an Any replacement) in the output when enabled.
Default value: "false"
Includes enums (instead of an Any replacement) in the output when enabled.
Default value: "false"
Includes all input objects (instead of an Any replacement) in the output when enabled.
Default value: "false"
Includes all directives in the output when enabled. Default value: "false"
4 nested properties
Choose the collection name to be generated. Defaults to allowed-queries Default value: "allowed-queries"
Target metadata config version. Supported versions are 2 and 3. This is mostly for future proofing, currently has no impact as both versions use the same format. The default value will change in the future if/when newer config versions are released. Default value: "3"
Whether to source fragments per-document, or globally. If set, will enforce fragment name uniqueness Default value: "false"
Whether to order fragments by global definition order, or by definition order in the document Default value: "definition"
List of plugins to apply to this current output file.
You can either specify plugins from the community using the NPM package name (after you installed it in your project), or you can use a path to a local file for custom plugins.
You can find a list of available plugins here: https://the-guild.dev/graphql/codegen/docs/plugins/index Need a custom plugin? read this: https://the-guild.dev/graphql/codegen/docs/custom-codegen/index
If your setup uses Preset to have a more dynamic setup and output, set the name of your preset here.
Presets are a way to have more than one file output, for example: https://the-guild.dev/graphql/codegen/docs/presets/near-operation-file
You can either specify a preset from the community using the NPM package name (after you installed it in your project), or you can use a path to a local file for a custom preset.
List of available presets: https://graphql-code-generator.com/docs/presets/presets-index
If your setup uses Preset to have a more dynamic setup and output, set the configuration object of your preset here.
List of available presets: https://graphql-code-generator.com/docs/presets/presets-index
A flag to overwrite files if they already exist when generating code (true by default).
For more details: https://graphql-code-generator.com/docs/config-reference/codegen-config
DocumentTransform changes documents before executing plugins.
: Additional file pattern to watch when using watch mode
A compact string of patterns used in the config for granular configuration of Graphql Types.
The string can contain one or more patterns, each pattern ends with a semi-colon (;).
To apply an option to all Graphql Types or all fields, use the allTypeNames (@*TypeNames) tokens.
Wherever you use the allTypeNames token, know very well that you can make some exceptions. After all, to every rule, there is an exception.
A square bracket ([]) is used to specify what should be included and a negated square bracket (-[]) is used to specify what should be excluded.
Manually typing out a pattern may be prone to typos resulting in invalid patterns therefore the TypeNamePattern class exposes some builder methods to be used in the plugin config file.
Available Builder Methods and the patterns they make
const Droid = TypeName.fromString('Droid');
const Starship = TypeName.fromString('Starship');
const Human = TypeName.fromString('Human');
const Movie = TypeName.fromString('Movie');
// Configuring specific Graphql Types
const pattern = TypeNamePattern.forTypeNames([Droid, Starship]);
console.log(pattern); // "Droid;Starship;"
// Configuring all Graphql Types
const pattern = TypeNamePattern.forAllTypeNames();
console.log(pattern); // "@*TypeNames;"
// Configuring all Graphql Types except those specified in the exclusion list of TypeNames
const pattern = TypeNamePattern.forAllTypeNamesExcludeTypeNames([Droid, Starship]);
console.log(pattern); // "@*TypeNames-[Droid,Starship];"
represents a single valid GraphQL Type Name used in the GraphQL Schema provided
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used
A raw configuration for enumValues map - can be represented with a single string value for a file path, a map between enum name and a file path, or a map between enum name and an object with explicit enum values.
A map between the GraphQL directive name and the identifier that should be used
A map between the GraphQL directive name and the identifier that should be used
Adds integration with Apollo Client's @unmask directive
when using Apollo Client's data masking feature. @unmask ensures fields
marked by @unmask are available in the type definition.
Default value: "false"
A raw configuration for enumValues map - can be represented with a single string value for a file path, a map between enum name and a file path, or a map between enum name and an object with explicit enum values.
A map between the GraphQL directive name and the identifier that should be used
A map between the GraphQL directive name and the identifier that should be used
Scalars map or a string, a map between the GraphQL scalar name and the identifier that should be used