github dotansimha/graphql-code-generator release-1789878278469
September 20, 2026

2 hours ago

@graphql-codegen/cli@7.4.2

Patch Changes

  • #10956
    cec9c1c
    Thanks @eddeee888! - Fix dynamically-loaded plugins/presets in ESM
    builds. Previously, ESM used the bare module specifier without resolving it relative to the
    consuming project first, so a plugin only loaded if it happened to be reachable from the CLI
    package's own node_modules. Resolving it the same way the CJS build already does
    (relativeRequire.resolve(mod)) fixes that, but the resolved absolute path also has to be
    converted to a file:// URL (pathToFileURL(...).href) before being passed to import()
    otherwise, on Windows, the loader misparses a raw path like C:\... as a c: protocol scheme and
    throws ERR_UNSUPPORTED_ESM_URL_SCHEME.

  • #10966
    3029b60
    Thanks @eddeee888! - Fix lifecycle hook scripts (e.g.
    hooks: { afterAllFileWrite: ['prettier --write'] } }) failing on Windows when the file paths
    passed to them contain a backslash or other POSIX shell-special character. Hook arguments were
    always quoted using POSIX single-quoting, but child_process.exec() runs through cmd.exe on
    Windows by default, which doesn't strip single quotes — so the hook script received the literal
    quote characters as part of its argument and failed to find the file. Arguments are now quoted
    per-platform: POSIX quoting stays unchanged elsewhere, and Windows arguments are wrapped in double
    quotes only when they actually need it, matching cmd.exe's own convention.

  • #10959
    7dffaae
    Thanks @eddeee888! - Fix the CLI reporting success (exit code 0)
    when a generates output's preset can't be resolved. The error was shown in the terminal but
    never counted toward the run's failure state, so allowPartialOutputs: false (the default) never
    took effect for this case.

@graphql-codegen/typescript-operations@6.1.7

Patch Changes

  • #10954
    2deb08f
    Thanks @eddeee888! - Fix typescript-operations emitting an
    unused import type * as Types from '...' (with importSchemaTypesFrom) or an unused local
    enum/input declaration (without it) when inlineFragmentTypes is 'combine' or 'mask' and the
    generated file only ever references a schema type through a fragment spread that collapses to a
    bare FooFragment reference, never naming the type itself. The schema-type import/declaration
    decision, and the enum/scalar re-export decisions, are now based on the schema types actually
    named by this file's own generated output, rather than every schema type reachable through the
    document (including via fragments defined elsewhere).

Don't miss a new graphql-code-generator release

NewReleases is sending notifications on new releases.