# What changed in @graphql-codegen/visitor-plugin-common

> 27 changes in @graphql-codegen/visitor-plugin-common 7 from its official release notes, upgrade guides and advisories: 1 breaking, 3 new APIs and options. Each one cited. Sources checked 2026-10-21. HTML: https://unstale.sh/npm/@graphql-codegen/visitor-plugin-common/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## @graphql-codegen/visitor-plugin-common 7

### Breaking changes

- 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. (7.2.10) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/da5a168bb075cea64def6aa83becf07e0d85be40/packages/plugins/other/visitor-plugin-common/CHANGELOG.md#7210)

### New APIs and options

- 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. (7.4.0) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/da5a168bb075cea64def6aa83becf07e0d85be40/packages/plugins/other/visitor-plugin-common/CHANGELOG.md#740)
- Adds plainString mode, generating documents as plain template strings with embedded fragments instead of TypedDocumentString instances; each document is typed as string. (7.3.0) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/da5a168bb075cea64def6aa83becf07e0d85be40/packages/plugins/other/visitor-plugin-common/CHANGELOG.md#730)
- Returns the default reason for a @deprecated directive without arguments. (7.2.10) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/da5a168bb075cea64def6aa83becf07e0d85be40/packages/plugins/other/visitor-plugin-common/CHANGELOG.md#7210)

### Behavior and default changes

- rawMappers defaults to {}. (7.2.10) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/da5a168bb075cea64def6aa83becf07e0d85be40/packages/plugins/other/visitor-plugin-common/CHANGELOG.md#7210)

### Fixes and other changes

- SchemaDefinition() and SchemaExtension() are typed to return null instead of any. (7.2.10) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/da5a168bb075cea64def6aa83becf07e0d85be40/packages/plugins/other/visitor-plugin-common/CHANGELOG.md#7210)
- May return null, matching its existing return behavior. (7.2.10) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/da5a168bb075cea64def6aa83becf07e0d85be40/packages/plugins/other/visitor-plugin-common/CHANGELOG.md#7210)
- The typeCache key type is Location | undefined. (7.2.10) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/da5a168bb075cea64def6aa83becf07e0d85be40/packages/plugins/other/visitor-plugin-common/CHANGELOG.md#7210)
- SchemaDefinition() and SchemaExtension() are typed to return null instead of any. (7.2.10) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/da5a168bb075cea64def6aa83becf07e0d85be40/packages/plugins/other/visitor-plugin-common/CHANGELOG.md#7210)
- Its parameter is typed as string[] | null | undefined, matching its empty-string handling. (7.2.10) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/da5a168bb075cea64def6aa83becf07e0d85be40/packages/plugins/other/visitor-plugin-common/CHANGELOG.md#7210)
- Accepts an undefined scalars mapping and uses only the defaults and the schema. (7.2.10) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/da5a168bb075cea64def6aa83becf07e0d85be40/packages/plugins/other/visitor-plugin-common/CHANGELOG.md#7210)
- Accepts nullish identifier and source, and throws a descriptive error when either is missing. (7.2.10) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/da5a168bb075cea64def6aa83becf07e0d85be40/packages/plugins/other/visitor-plugin-common/CHANGELOG.md#7210)
- Treats an enum node without values as empty instead of throwing. (7.2.10) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/da5a168bb075cea64def6aa83becf07e0d85be40/packages/plugins/other/visitor-plugin-common/CHANGELOG.md#7210)
- When blockTransformer is undefined, the block is returned unchanged instead of throwing. (7.2.10) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/da5a168bb075cea64def6aa83becf07e0d85be40/packages/plugins/other/visitor-plugin-common/CHANGELOG.md#7210)
- Fields are typed as string | null, with _name typed as string | NameNode | null. (7.2.10) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/da5a168bb075cea64def6aa83becf07e0d85be40/packages/plugins/other/visitor-plugin-common/CHANGELOG.md#7210)
- Accepts null, which renders the same as no block. (7.2.10) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/da5a168bb075cea64def6aa83becf07e0d85be40/packages/plugins/other/visitor-plugin-common/CHANGELOG.md#7210)
- Treats missing identifiers as empty. (7.2.10) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/da5a168bb075cea64def6aa83becf07e0d85be40/packages/plugins/other/visitor-plugin-common/CHANGELOG.md#7210)
- The type parameter accepts null, which graphql 15's schema.getType() can return. (7.2.10) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/da5a168bb075cea64def6aa83becf07e0d85be40/packages/plugins/other/visitor-plugin-common/CHANGELOG.md#7210)
- Returns false instead of undefined. (7.2.10) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/da5a168bb075cea64def6aa83becf07e0d85be40/packages/plugins/other/visitor-plugin-common/CHANGELOG.md#7210)
- getName and transform may return null, matching their existing return behavior. (7.2.10) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/da5a168bb075cea64def6aa83becf07e0d85be40/packages/plugins/other/visitor-plugin-common/CHANGELOG.md#7210)
- Emits an empty string instead of the text undefined or null when a variable has no name or type identifier. (7.2.10) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/da5a168bb075cea64def6aa83becf07e0d85be40/packages/plugins/other/visitor-plugin-common/CHANGELOG.md#7210)
- Throws a descriptive error when a document file has no parsed document. (7.2.10) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/da5a168bb075cea64def6aa83becf07e0d85be40/packages/plugins/other/visitor-plugin-common/CHANGELOG.md#7210)
- These fields accept null, matching values already emitted by parseEnumValues. (7.2.10) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/da5a168bb075cea64def6aa83becf07e0d85be40/packages/plugins/other/visitor-plugin-common/CHANGELOG.md#7210)
- Returned nodes use description: undefined instead of any. (7.2.10) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/da5a168bb075cea64def6aa83becf07e0d85be40/packages/plugins/other/visitor-plugin-common/CHANGELOG.md#7210)
- The returned typeInfo is typed as { name: string; type: string } | null. (7.2.10) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/da5a168bb075cea64def6aa83becf07e0d85be40/packages/plugins/other/visitor-plugin-common/CHANGELOG.md#7210)
- Accepts undefined and null, which it handles by returning an empty string. (7.2.10) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/da5a168bb075cea64def6aa83becf07e0d85be40/packages/plugins/other/visitor-plugin-common/CHANGELOG.md#7210)
- The default key uses String(item). (7.2.10) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/da5a168bb075cea64def6aa83becf07e0d85be40/packages/plugins/other/visitor-plugin-common/CHANGELOG.md#7210)
