NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm
npm, #2760 most downloaded on npm
Latest stable
8.0.1
Last release 12 days ago
10 Nov 2026
Ships fairly regularly
a new release about every 9 days
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
6698 releases · first in 2019
Drag across the ruler to compare, or tap a release to open it.
### Patch Changes - #11099 `6138e3f` Thanks @ewerton336! - Fix typesPrefix being applied to enum keys when generating enums as const (enumsAsConst: tr
6138e3f
Thanks @ewerton336! - Fix typesPrefix being applied to enum
keys when generating enums as const (enumsAsConst: true or enumType: 'const')@graphql-codegen/visitor-plugin-common@8.0.0
@graphql-codegen/visitor-plugin-common@8.0.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →
#11075
fa49a37
Thanks @eddeee888! - BREAKING CHANGE: GraphQL 14 and 15 are no
longer supported. The graphql peer dependency is now ^16.0.0 || ^17.0.0, so upgrade graphql
to version 16 or 17 before updating to this version.
#11075
fa49a37
Thanks @eddeee888! - BREAKING CHANGE: Node.js versions below
22.18.0 are no longer supported. Upgrade to Node.js 22.18.0 or later before updating to this
version.
#11075
fa49a37
Thanks @eddeee888! - BREAKING CHANGE: Remove the deprecated
emitLegacyCommonJSImports config option and the --emit-legacy-common-js-imports CLI flag
Use importExtension (or --import-extension) to set the extension appended to relative imports.
When importExtension is not set, no extension is appended.
@graphql-codegen/plugin-helpers no longer exports normalizeImportExtension. Use
importExtension ?? '' instead.
Migration:
const config: CodegenConfig = {
- emitLegacyCommonJSImports: false,
+ importExtension: '.js',
};
#11075
fa49a37
Thanks @eddeee888! - BREAKING CHANGE: @graphql-tools/*
dependencies are updated to their latest majors, which require Node.js 22.18.0 or later and
GraphQL 16 or 17. If you import @graphql-tools/* packages in your own code, update them to the
same majors to avoid duplicate installs. @graphql-tools/code-file-loader@9 now extracts
#graphql-marked template literals by default, so code files that contain such templates can
produce newly found documents; check your generated output after upgrading. To keep the previous
behavior, set pluckConfig: { gqlHashComment: '' }.
#11103
409ffbf
Thanks @jerelmiller! - Add support for graphql v17 fragment
arguments (experimentalFragmentArguments).
To use fragment arguments, set the parser option in the root config:
const config: CodegenConfig = {
config: { experimentalFragmentArguments: true }
// ...
}
#11075
fa49a37
Thanks @eddeee888! - dependencies updates:
@graphql-tools/optimize@^3.0.0 ↗︎
(from ^2.0.0, in dependencies)@graphql-tools/relay-operation-optimizer@^8.0.2 ↗︎
(from ^7.1.12, in dependencies)@graphql-tools/utils@^13.0.2 ↗︎
(from ^12.0.3, in dependencies)graphql@^16.0.0 || ^17.0.0 ↗︎ (from
^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0,
in peerDependencies)#11075
fa49a37
Thanks @eddeee888! - dependencies updates:
@graphql-tools/optimize@^3.0.0 ↗︎
(from ^2.0.0, in dependencies)@graphql-tools/relay-operation-optimizer@^8.0.2 ↗︎
(from ^7.1.12, in dependencies)@graphql-tools/utils@^13.0.2 ↗︎
(from ^12.0.3, in dependencies)graphql@^16.0.0 || ^17.0.0 ↗︎ (from
^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0,
in peerDependencies)Updated dependencies
[fa49a37,
fa49a37,
fa49a37,
fa49a37,
fa49a37,
fa49a37,
fa49a37,
fa49a37,
fa49a37,
fa49a37,
fa49a37]:
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
@graphql-codegen/visitor-plugin-common@7.5.0
@graphql-codegen/visitor-plugin-common@7.5.0
48ebd5d
Thanks @eddeee888! - Add enumType: 'native-with-string-values'.
Enums are declared as native enums, and operation variables and input object fields accept either
the enum member or its string value (E | `${E}` ).@graphql-codegen/visitor-plugin-common@7.4.0
@graphql-codegen/visitor-plugin-common@7.4.0
#11060
e2b3249
Thanks @santialbo! - Add the
inlineReferencedFragmentsInFragmentDocuments option. With documentMode: graphQLTag, each
fragment document then includes the fragments that it spreads, so you can use it on its own. The
default is false, and operation documents do not change.
Refs #11040
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
@graphql-codegen/visitor-plugin-common@7.3.0
@graphql-codegen/visitor-plugin-common@7.3.0
b3fbb13
Thanks @eddeee888! - Add documentMode: 'plainString'. Documents
are generated as plain template strings with fragments embedded, instead of TypedDocumentString
instances. No class, import or type cast is generated, so each document is typed as string.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
@graphql-codegen/visitor-plugin-common@7.2.10
@graphql-codegen/visitor-plugin-common@7.2.10
#10985
d8aa07f
Thanks @eddeee888! - Build with strict: true, which changes
these emitted type declarations:
@graphql-codegen/cli: mkdirp returns Promise<string | undefined>, and the require (-r)
CLI option's default is typed never[] instead of any[].@graphql-codegen/visitor-plugin-common: BaseResolversVisitor and BaseTypesVisitor
SchemaDefinition()/SchemaExtension() return null instead of any.@graphql-codegen/visitor-plugin-common: BaseSelectionSetProcessor.typeCache is keyed by
Location | undefined.@graphql-codegen/visitor-plugin-common: SelectionSetToObject.buildSelectionSet returns
typeInfo as { name: string; type: string } | null.@graphql-codegen/visitor-plugin-common: getPossibleTypes accepts null as the type, which
graphql 15's schema.getType() can return.@graphql-codegen/visitor-plugin-common: removeDescription returns nodes with
description: undefined instead of any.@graphql-codegen/typescript: TsIntrospectionVisitor's constructor takes pluginConfig as
TypeScriptPluginConfig | undefined, DirectiveDefinition() returns null and
ObjectTypeDefinition() returns string | null.@graphql-codegen/client-preset: the babel preset accepts options as
ClientBabelPresetOptions | null | undefined.@graphql-codegen/testing: mockGraphQLServer returns nock.Scope | null.@graphql-codegen/graphql-modules-preset: a schema without extensions (graphql 15) throws the
"requires to use GraphQL SDL" error instead of a TypeError.Generated output is unchanged.
#11039
5078faf
Thanks @eddeee888! - Fix type errors in visitor-plugin-common
(utils, imports, naming, mappers, types, variables-to-object,
convert-schema-enum-to-declaration-block-string, selection-set-processor/base and
optimize-operations) under strict: true:
transformComment accepts undefined and null, which it already handles by returning an
empty string.block declares its param as string[] | null | undefined, which it already handles by
returning an empty string.DeclarationBlock's fields are typed as string | null (_name as
string | NameNode | null), and withBlock accepts null, which renders the same as no block.DeclarationBlock falls back to returning the block unchanged when blockTransformer is passed
as undefined, instead of throwing.buildScalars accepts an undefined scalars mapping, which it already handles by using only
the defaults and the schema.buildTypeImport accepts a nullish identifier and source, and throws a descriptive error
when either is missing.ParsedEnumValuesMap's mappedValues, sourceIdentifier, sourceFile and importIdentifier
accept null, which parseEnumValues already emits.transformMappers defaults rawMappers to {}.OperationVariablesToObject.getName, OperationVariablesToObject.transform and
BaseSelectionSetProcessor.buildSelectionSetFromStrings may return null, which they already
return.buildEnumValuesBlock throws a descriptive error when an enum value is not defined on the
schema's enum.optimizeOperations throws a descriptive error when a document file has no parsed document.unique's default key uses String(item).convertSchemaEnumToDeclarationBlockString treats an enum node without values as empty
instead of throwing.generateFragmentImportStatement treats a missing identifiers as empty.getDeprecationReason returns the default reason for a @deprecated directive without
arguments.isOneOfInputObjectType returns false instead of undefined.buildEnumValuesBlock treats a non-enum schema type with the enum's name as having no schema
enum.OperationVariablesToObject emits '' instead of the text undefined/null when a variable
has no name or no type identifier.Generated output is unchanged, except in the cases above.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
@graphql-codegen/visitor-plugin-common@7.2.9
@graphql-codegen/visitor-plugin-common@7.2.9
#11043
31761f9
Thanks @eddeee888! - dependencies updates:
@graphql-tools/relay-operation-optimizer@^7.1.12 ↗︎
(from ^7.1.1, in dependencies)@graphql-tools/utils@^12.0.3 ↗︎
(from ^11.2.0, in dependencies)#11043
31761f9
Thanks @eddeee888! - Update @graphql-tools/utils to v12, and
other @graphql-tools/* dependencies and graphql-config to releases that use it, to pick up the
fix for GHSA-7mx3-vvmw-hjmv (prototype
pollution in mergeDeep, @graphql-tools/utils <= 12.0.0).
@graphql-codegen/cli now unwraps the AggregateError that newer @graphql-tools/load versions
throw, so schema and document syntax errors still print the native GraphQLError with its file
location.
#11037
463e6ef
Thanks @eddeee888! - Fix type errors in visitor-plugin-common
(base-types-visitor) under strict: true:
BaseTypesVisitor's constructor takes additionalConfig as Partial<TPluginConfig>, since the
visitor fills in the defaults for every key it leaves out.BaseTypesVisitor handles input objects, objects, interfaces, unions and enums without
fields, types, values or description by treating them as empty, instead of throwing.Generated output is unchanged.
Updated dependencies
[31761f9,
31761f9]:
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.