npm / @graphql-codegen/cli
@graphql-codegen/cli
What changed in @graphql-codegen/cli 7, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-22.
1 security2 behavior and defaults10 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@graphql-codegen/cli 713 changes
Security 1
Updates to v12 and related dependencies to pick up the fix for prototype pollution in mergeDeep.
Behavior and default changes 2
The CLI option's default is now typed never[] instead of any[].
Its return type is now Types.Config without an argument and T & Types.Config when extraConfig is provided.
Fixes and other changes 10
The emitted return type is now Promise<string | undefined>.
The CLI unwraps AggregateError so syntax errors continue to print the native GraphQLError with its file location.
The property is now typed as string[].
The filepath property is now optional, matching contexts without a filepath.
Its return type now includes null, matching the result when no config file is found.
The per-entry schema loader type now accepts a CustomSchemaLoaderFn as well as a path string, so imported loader functions no longer require a cast.
The function now accepts null and undefined and returns an empty array for them.
The function now accepts null and undefined and returns an empty array for them.
Function loaders are keyed by object identity, so different loader functions for the same pointer load separate schemas while a reused function loads once.
The type now includes the kebab-case flags that the CLI reads.