# What changed in @graphql-codegen/typescript

> 30 changes in @graphql-codegen/typescript 2 to 7 from its official release notes, upgrade guides and advisories: 21 breaking. Each one cited. Sources checked 2026-11-12. HTML: https://unstale.sh/npm/@graphql-codegen/typescript/

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

## @graphql-codegen/typescript 7

### Breaking changes

- GraphQL 14 and 15 are no longer supported; the peer dependency now requires ^16.0.0 or ^17.0.0. (7.0.0) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/06568ddc68f1010b7dda6e99a1f5b20cb154377a/packages/plugins/typescript/typescript/CHANGELOG.md#700)
- Node.js versions below 22.18.0 are no longer supported; upgrade to 22.18.0 or later. (7.0.0) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/06568ddc68f1010b7dda6e99a1f5b20cb154377a/packages/plugins/typescript/typescript/CHANGELOG.md#700)

### Fixes and other changes

- Fixes typesPrefix being applied to enum keys when generating enums as const. (7.0.1) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/06568ddc68f1010b7dda6e99a1f5b20cb154377a/packages/plugins/typescript/typescript/CHANGELOG.md#701)

## @graphql-codegen/typescript 6

### Breaking changes

- The visitor methods’ path and ancestors parameters are now required, matching the values the visitor always passes and fixing type errors under strict: true. (6.1.1) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/68a2ef2586b969470993116846628d6075d2f19b/packages/plugins/typescript/typescript/CHANGELOG.md#611)
- The default custom scalar type is now unknown instead of any. (6.0.0) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/68a2ef2586b969470993116846628d6075d2f19b/packages/plugins/typescript/typescript/CHANGELOG.md#600)
- The extractAllFieldsToTypes option moved from base-visitor to documents-visitor. (6.0.0) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/68a2ef2586b969470993116846628d6075d2f19b/packages/plugins/typescript/typescript/CHANGELOG.md#600)
- The globalNamespace option moved from base-visitor to documents-visitor. (6.0.0) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/68a2ef2586b969470993116846628d6075d2f19b/packages/plugins/typescript/typescript/CHANGELOG.md#600)
- The ignoreEnumValuesFromSchema option moved from base-visitor to documents-visitor and types-visitor. (6.0.0) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/68a2ef2586b969470993116846628d6075d2f19b/packages/plugins/typescript/typescript/CHANGELOG.md#600)
- The nonOptionalTypename option moved from base-visitor to documents-visitor and types-visitor. (6.0.0) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/68a2ef2586b969470993116846628d6075d2f19b/packages/plugins/typescript/typescript/CHANGELOG.md#600)
- The getRootTypeNames function was removed because it is available in @graphql-utils/tools and was unused. (6.0.0) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/68a2ef2586b969470993116846628d6075d2f19b/packages/plugins/typescript/typescript/CHANGELOG.md#600)
- The unused Incremental utility type was removed from the typescript plugin. (6.0.0) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/68a2ef2586b969470993116846628d6075d2f19b/packages/plugins/typescript/typescript/CHANGELOG.md#600)
- The unused MakeEmpty utility type was removed from the typescript plugin. (6.0.0) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/68a2ef2586b969470993116846628d6075d2f19b/packages/plugins/typescript/typescript/CHANGELOG.md#600)
- The unused MakeMaybe utility type was removed from the typescript plugin. (6.0.0) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/68a2ef2586b969470993116846628d6075d2f19b/packages/plugins/typescript/typescript/CHANGELOG.md#600)
- The unused MakeOptional utility type was removed from the typescript plugin. (6.0.0) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/68a2ef2586b969470993116846628d6075d2f19b/packages/plugins/typescript/typescript/CHANGELOG.md#600)
- Node 20 support is dropped; users are asked to upgrade to Node 22. (6.0.0) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/68a2ef2586b969470993116846628d6075d2f19b/packages/plugins/typescript/typescript/CHANGELOG.md#600)
- The addTypename option moved from base-visitor to types-visitor because it is only a types-visitor concern. (6.0.0) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/68a2ef2586b969470993116846628d6075d2f19b/packages/plugins/typescript/typescript/CHANGELOG.md#600)
- The ignoreEnumValuesFromSchema option moved from base-visitor to documents-visitor and types-visitor. (6.0.0) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/68a2ef2586b969470993116846628d6075d2f19b/packages/plugins/typescript/typescript/CHANGELOG.md#600)
- The skipTypename option moved from base-visitor to types-visitor because it is only a types-visitor concern. (6.0.0) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/68a2ef2586b969470993116846628d6075d2f19b/packages/plugins/typescript/typescript/CHANGELOG.md#600)
- The typescript plugin no longer generates the Exact utility type; typescript-operations generates it for each operation file instead. (6.0.0) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/68a2ef2586b969470993116846628d6075d2f19b/packages/plugins/typescript/typescript/CHANGELOG.md#600)
- The plugin no longer generates InputMaybe and Scalars types; it now uses native TypeScript types instead. (6.0.0) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/68a2ef2586b969470993116846628d6075d2f19b/packages/plugins/typescript/typescript/CHANGELOG.md#600)

### Fixes and other changes

- The method's emitted type declaration now allows a null return. (6.1.2) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/68a2ef2586b969470993116846628d6075d2f19b/packages/plugins/typescript/typescript/CHANGELOG.md#612)
- The method's emitted type declaration now returns string | null. (6.1.2) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/68a2ef2586b969470993116846628d6075d2f19b/packages/plugins/typescript/typescript/CHANGELOG.md#612)
- The constructor's pluginConfig parameter is typed as TypeScriptPluginConfig | undefined. (6.1.2) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/68a2ef2586b969470993116846628d6075d2f19b/packages/plugins/typescript/typescript/CHANGELOG.md#612)
- Document files without a document are skipped when collecting introspection types. (6.1.1) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/68a2ef2586b969470993116846628d6075d2f19b/packages/plugins/typescript/typescript/CHANGELOG.md#611)
- Types the visitor parameters overridden by TsVisitor and allows EnumTypeDefinition to return null, fixing type errors under strict: true. (6.1.1) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/68a2ef2586b969470993116846628d6075d2f19b/packages/plugins/typescript/typescript/CHANGELOG.md#611)
- The enumPrefix option moved to base-visitor so all three visitor types can keep enum type names in sync. (6.0.0) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/68a2ef2586b969470993116846628d6075d2f19b/packages/plugins/typescript/typescript/CHANGELOG.md#600)
- The enumSuffix option moved to base-visitor so all three visitor types can keep enum type names in sync. (6.0.0) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/68a2ef2586b969470993116846628d6075d2f19b/packages/plugins/typescript/typescript/CHANGELOG.md#600)
- Fixed namingConvention so it is applied consistently, including in imports, Variables, Input, and Result. (6.0.0) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/68a2ef2586b969470993116846628d6075d2f19b/packages/plugins/typescript/typescript/CHANGELOG.md#600)

## @graphql-codegen/typescript 3

### Breaking changes

- Node.js 12 support was dropped, so developers can no longer rely on this package supporting Node.js 12. (3.0.0) — [release notes](https://github.com/dotansimha/graphql-code-generator/blob/HEAD/packages/plugins/typescript/typescript/CHANGELOG.md)

## @graphql-codegen/typescript 2

### Breaking changes

- Node 10 is no longer supported by graphql-tools or Codegen packages. (2.0.0) — [release notes](https://github.com/dotansimha/graphql-code-generator/releases/tag/%40graphql-codegen/typescript%402.0.0)
