unstale

npm / @graphql-codegen/typescript

@graphql-codegen/typescript

What changed in @graphql-codegen/typescript 2 to 7, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-12.

21 breaking9 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.3.0 on npm

@graphql-codegen/typescript 73 changes

Breaking changes 2

  • GraphQL 14 and 15 are no longer supported; the peer dependency now requires ^16.0.0 or ^17.0.0.

    7.0.0release notes

  • Node.js versions below 22.18.0 are no longer supported; upgrade to 22.18.0 or later.

    7.0.0release notes

Fixes and other changes 1

  • Fixes typesPrefix being applied to enum keys when generating enums as const.

    7.0.1release notes

@graphql-codegen/typescript 625 changes

Breaking changes 17

  • 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.1release notes

  • The default custom scalar type is now unknown instead of any.

    6.0.0release notes

  • The extractAllFieldsToTypes option moved from base-visitor to documents-visitor.

    6.0.0release notes

  • The globalNamespace option moved from base-visitor to documents-visitor.

    6.0.0release notes

  • The ignoreEnumValuesFromSchema option moved from base-visitor to documents-visitor and types-visitor.

    6.0.0release notes

  • The nonOptionalTypename option moved from base-visitor to documents-visitor and types-visitor.

    6.0.0release notes

  • The getRootTypeNames function was removed because it is available in @graphql-utils/tools and was unused.

    6.0.0release notes

  • The unused Incremental utility type was removed from the typescript plugin.

    6.0.0release notes

  • The unused MakeEmpty utility type was removed from the typescript plugin.

    6.0.0release notes

  • The unused MakeMaybe utility type was removed from the typescript plugin.

    6.0.0release notes

  • The unused MakeOptional utility type was removed from the typescript plugin.

    6.0.0release notes

  • Node 20 support is dropped; users are asked to upgrade to Node 22.

    6.0.0release notes

  • The addTypename option moved from base-visitor to types-visitor because it is only a types-visitor concern.

    6.0.0release notes

  • The ignoreEnumValuesFromSchema option moved from base-visitor to documents-visitor and types-visitor.

    6.0.0release notes

  • The skipTypename option moved from base-visitor to types-visitor because it is only a types-visitor concern.

    6.0.0release notes

  • The typescript plugin no longer generates the Exact utility type; typescript-operations generates it for each operation file instead.

    6.0.0release notes

  • The plugin no longer generates InputMaybe and Scalars types; it now uses native TypeScript types instead.

    6.0.0release notes

Fixes and other changes 8

  • The method's emitted type declaration now allows a null return.

    6.1.2release notes

  • The method's emitted type declaration now returns string | null.

    6.1.2release notes

  • The constructor's pluginConfig parameter is typed as TypeScriptPluginConfig | undefined.

    6.1.2release notes

  • Document files without a document are skipped when collecting introspection types.

    6.1.1release notes

  • Types the visitor parameters overridden by TsVisitor and allows EnumTypeDefinition to return null, fixing type errors under strict: true.

    6.1.1release notes

  • The enumPrefix option moved to base-visitor so all three visitor types can keep enum type names in sync.

    6.0.0release notes

  • The enumSuffix option moved to base-visitor so all three visitor types can keep enum type names in sync.

    6.0.0release notes

  • Fixed namingConvention so it is applied consistently, including in imports, Variables, Input, and Result.

    6.0.0release notes

@graphql-codegen/typescript 31 changes

Breaking changes 1

  • Node.js 12 support was dropped, so developers can no longer rely on this package supporting Node.js 12.

    3.0.0release notes

@graphql-codegen/typescript 21 changes

Breaking changes 1

  • Node 10 is no longer supported by graphql-tools or Codegen packages.

    2.0.0release notes