npm / @graphql-codegen/visitor-plugin-common
@graphql-codegen/visitor-plugin-common
What changed in @graphql-codegen/visitor-plugin-common 7, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-21.
1 breaking3 new APIs and options1 behavior and defaults22 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@graphql-codegen/visitor-plugin-common 727 changes
Breaking changes 1
Throws a descriptive error when an enum value is not defined on the schema's enum, and treats a non-enum schema type with the enum's name as having no schema enum.
New APIs and options 3
Adds an option that, with documentMode: graphQLTag, includes spread fragments in each fragment document so it can be used on its own; defaults to false, and operation documents do not change.
Adds plainString mode, generating documents as plain template strings with embedded fragments instead of TypedDocumentString instances; each document is typed as string.
Returns the default reason for a @deprecated directive without arguments.
Behavior and default changes 1
rawMappers defaults to {}.
Fixes and other changes 22
SchemaDefinition() and SchemaExtension() are typed to return null instead of any.
May return null, matching its existing return behavior.
The typeCache key type is Location | undefined.
SchemaDefinition() and SchemaExtension() are typed to return null instead of any.
Its parameter is typed as string[] | null | undefined, matching its empty-string handling.
Accepts an undefined scalars mapping and uses only the defaults and the schema.
Accepts nullish identifier and source, and throws a descriptive error when either is missing.
Treats an enum node without values as empty instead of throwing.
When blockTransformer is undefined, the block is returned unchanged instead of throwing.
Fields are typed as string | null, with _name typed as string | NameNode | null.
Accepts null, which renders the same as no block.
Treats missing identifiers as empty.
The type parameter accepts null, which graphql 15's schema.getType() can return.
Returns false instead of undefined.
getName and transform may return null, matching their existing return behavior.
Emits an empty string instead of the text undefined or null when a variable has no name or type identifier.
Throws a descriptive error when a document file has no parsed document.
These fields accept null, matching values already emitted by parseEnumValues.
Returned nodes use description: undefined instead of any.
The returned typeInfo is typed as { name: string; type: string } | null.
Accepts undefined and null, which it handles by returning an empty string.
The default key uses String(item).