#11025 43d0f65
Thanks @BuddhaBing! - Widen Types.SchemaWithLoaderOptions['loader'] to accept a custom loader function
(CustomSchemaLoaderFn) in addition to a path string.
A per-entry schema custom loader ({ '<pointer>': { loader, ...options } }) is resolved by @graphql-tools/load's useCustomLoader, which already accepts either a path string (resolved
via require()) or a function value at runtime (typeof loaderPointer === 'function'). Only the
TypeScript type restricted loader to string, forcing consumers who pass an imported loader
function (or a class instance exposing a bound loader property) to cast the schema array to
bypass the type error, even though it worked correctly at runtime.
This is additive and backward compatible — loader: string continues to type-check exactly as
before.
Also fixes a schema-cache collision for function loaders in @graphql-codegen/cli: the cache key
is JSON.stringify(schemaPointerMap), and JSON.stringify drops functions, so two generates
targets using different loader functions for the same pointer
({ 'schema.graphql': { loader: fnA } } vs { loader: fnB }) both keyed as {"schema.graphql":{}} and the second silently reused the first's schema. Function values are now
keyed by object identity (via the existing getJsObjectId), so distinct loaders load separately
while one function reused across targets still loads once.
@graphql-codegen/cli: loadCodegenConfig returns Promise<LoadCodegenConfigResult | null>,
matching the null it resolves to when no config file is found. YamlCliFlags includes the
kebab-case ignore-no-documents, emit-legacy-common-js-imports and import-extension flags
that the CLI reads. CodegenContext.filepath is optional, and watch mode only watches the
config file when the context has a filepath. CodegenContext.getConfig() without an argument
returns Types.Config, and getConfig(extraConfig) returns T & Types.Config. CodegenContext.checkModeStaleFiles is typed as string[]. Adds @types/yargs, @types/babel__generator and @types/babel__template as dev dependencies.
@graphql-codegen/plugin-helpers: normalizeInstanceOrArray and normalizeConfig accept null and undefined, returning [].
@graphql-codegen/plugin-helpers: ProfilerEvent.cat is optional, matching the Trace Event
format and Profiler.run's optional cat. FederationMeta's reference selection sets are
typed recursively ({ [field: string]: true | ReferenceSelectionSet }), matching the nested
selections @key/@requires/@provides produce. oldVisit's visitor param is typed as OldVisitor: enter and leave maps keyed by AST node kind, whose callbacks receive the typed
node plus graphql's key, parent, path and ancestors. Federation directives missing their fields argument, and operations whose root type is missing from the schema, throw a
descriptive error.
@graphql-codegen/typescript and @graphql-codegen/typescript-operations: the InputValueDefinition visitor methods take path and ancestors as required params, since the
visitor always passes them.
Generated output is unchanged.
#11014 7a376ef
Thanks @eddeee888! - Fix type errors in typescript under strict: true by typing the shared visitor methods it overrides:
@graphql-codegen/visitor-plugin-common: adds NormalizedDeclarationKindConfig (every
declaration kind set), used by normalizeDeclarationKind, DEFAULT_DECLARATION_KINDS and ParsedTypesConfig.declarationKind. BaseTypesVisitor's NamedType, ListType, FieldDefinition, InputValueDefinition and UnionTypeDefinition have typed visitor params
(key and parent are required, since the visitor always passes them), and ObjectTypeDefinition, EnumTypeDefinition and DirectiveDefinition may return null.
@graphql-codegen/typescript: skips document files without a document when collecting
introspection types, types the TsVisitor visitor params, and TsVisitor.EnumTypeDefinition
may return null like the introspection visitor's override.
@graphql-codegen/plugin-helpers: ProfilerEvent.cat is optional, matching the Trace Event
format and Profiler.run's optional cat. FederationMeta's reference selection sets are
typed recursively ({ [field: string]: true | ReferenceSelectionSet }), matching the nested
selections @key/@requires/@provides produce. oldVisit's visitor param is typed as OldVisitor: enter and leave maps keyed by AST node kind, whose callbacks receive the typed
node plus graphql's key, parent, path and ancestors. Federation directives missing their fields argument, and operations whose root type is missing from the schema, throw a
descriptive error.
@graphql-codegen/typescript and @graphql-codegen/typescript-operations: the InputValueDefinition visitor methods take path and ancestors as required params, since the
visitor always passes them.
Generated output is unchanged.
#11009 1f7566f
Thanks @eddeee888! - Fix type errors in typescript-operations
under strict: true by widening the shared types it calls into:
@graphql-codegen/plugin-helpers: Types.ComplexPluginOutput's prepend and append now
accept null items. Core already skipped them.
@graphql-codegen/visitor-plugin-common: DeclarationBlock.withComment accepts undefined, parseEnumValues's mapOrStr is optional (it already defaulted to {}), ImportSource.namespace accepts null, and optimizeOperations's includeFragments is
optional.
@graphql-codegen/typescript-operations: skips document files without a document, and no
longer throws when called without the plugin info argument.
This PR contains the following updates:
| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [@graphql-codegen/cli](https://github.com/dotansimha/graphql-code-generator) ([source](https://github.com/dotansimha/graphql-code-generator/tree/HEAD/packages/graphql-codegen-cli)) | [`7.4.3` → `7.4.4`](https://renovatebot.com/diffs/npm/@graphql-codegen%2fcli/7.4.3/7.4.4) |  |  |
| [@graphql-codegen/typescript](https://github.com/dotansimha/graphql-code-generator) ([source](https://github.com/dotansimha/graphql-code-generator/tree/HEAD/packages/plugins/typescript/typescript)) | [`6.1.0` → `6.1.1`](https://renovatebot.com/diffs/npm/@graphql-codegen%2ftypescript/6.1.0/6.1.1) |  |  |
| [@graphql-codegen/typescript-operations](https://github.com/dotansimha/graphql-code-generator) ([source](https://github.com/dotansimha/graphql-code-generator/tree/HEAD/packages/plugins/typescript/operations)) | [`6.1.9` → `6.1.10`](https://renovatebot.com/diffs/npm/@graphql-codegen%2ftypescript-operations/6.1.9/6.1.10) |  |  |
---
### Release Notes
<details>
<summary>dotansimha/graphql-code-generator (@​graphql-codegen/cli)</summary>
### [`v7.4.4`](https://github.com/dotansimha/graphql-code-generator/blob/HEAD/packages/graphql-codegen-cli/CHANGELOG.md#744)
[Compare Source](https://github.com/dotansimha/graphql-code-generator/compare/@graphql-codegen/cli@7.4.3...@graphql-codegen/cli@7.4.4)
##### Patch Changes
- [#​11025](https://github.com/dotansimha/graphql-code-generator/pull/11025)
[`43d0f65`](https://github.com/dotansimha/graphql-code-generator/commit/43d0f65c5a0f19a9743aef875e7a2ef3fe8c6e35)
Thanks [@​BuddhaBing](https://github.com/BuddhaBing)! - Widen
`Types.SchemaWithLoaderOptions['loader']` to accept a custom loader function
(`CustomSchemaLoaderFn`) in addition to a path string.
A per-entry `schema` custom loader (`{ '<pointer>': { loader, ...options } }`) is resolved by
`@graphql-tools/load`'s `useCustomLoader`, which already accepts either a path string (resolved
via `require()`) or a function value at runtime (`typeof loaderPointer === 'function'`). Only the
TypeScript type restricted `loader` to `string`, forcing consumers who pass an imported loader
function (or a class instance exposing a bound `loader` property) to cast the `schema` array to
bypass the type error, even though it worked correctly at runtime.
This is additive and backward compatible — `loader: string` continues to type-check exactly as
before.
Also fixes a schema-cache collision for function loaders in `@graphql-codegen/cli`: the cache key
is `JSON.stringify(schemaPointerMap)`, and `JSON.stringify` drops functions, so two `generates`
targets using different loader functions for the same pointer
(`{ 'schema.graphql': { loader: fnA } }` vs `{ loader: fnB }`) both keyed as
`{"schema.graphql":{}}` and the second silently reused the first's schema. Function values are now
keyed by object identity (via the existing `getJsObjectId`), so distinct loaders load separately
while one function reused across targets still loads once.
- [#​11020](https://github.com/dotansimha/graphql-code-generator/pull/11020)
[`82ebbb5`](https://github.com/dotansimha/graphql-code-generator/commit/82ebbb548b67eb8445cbc4ab71b782e65b29a973)
Thanks [@​eddeee888](https://github.com/eddeee888)! - Fix type errors in `cli` under
`strict: true`:
- `@graphql-codegen/cli`: `loadCodegenConfig` returns `Promise<LoadCodegenConfigResult | null>`,
matching the `null` it resolves to when no config file is found. `YamlCliFlags` includes the
kebab-case `ignore-no-documents`, `emit-legacy-common-js-imports` and `import-extension` flags
that the CLI reads. `CodegenContext.filepath` is optional, and watch mode only watches the
config file when the context has a `filepath`. `CodegenContext.getConfig()` without an argument
returns `Types.Config`, and `getConfig(extraConfig)` returns `T & Types.Config`.
`CodegenContext.checkModeStaleFiles` is typed as `string[]`. Adds `@types/yargs`,
`@types/babel__generator` and `@types/babel__template` as dev dependencies.
- `@graphql-codegen/plugin-helpers`: `normalizeInstanceOrArray` and `normalizeConfig` accept
`null` and `undefined`, returning `[]`.
Generated output is unchanged.
- Updated dependencies
\[[`43d0f65`](https://github.com/dotansimha/graphql-code-generator/commit/43d0f65c5a0f19a9743aef875e7a2ef3fe8c6e35),
[`82ebbb5`](https://github.com/dotansimha/graphql-code-generator/commit/82ebbb548b67eb8445cbc4ab71b782e65b29a973),
[`e972b6d`](https://github.com/dotansimha/graphql-code-generator/commit/e972b6d2a2a388748887d87c54fbb66617fc8f44),
[`eae0e62`](https://github.com/dotansimha/graphql-code-generator/commit/eae0e6263d658333069784969b6e13bbabccee52),
[`1f7566f`](https://github.com/dotansimha/graphql-code-generator/commit/1f7566f0bead301b21d4f7da49a4bc6924d07ef3)]:
- [@​graphql-codegen/plugin-helpers](https://github.com/graphql-codegen/plugin-helpers)@7.4.1
- [@​graphql-codegen/client-preset](https://github.com/graphql-codegen/client-preset)@6.2.1
</details>
<details>
<summary>dotansimha/graphql-code-generator (@​graphql-codegen/typescript)</summary>
### [`v6.1.1`](https://github.com/dotansimha/graphql-code-generator/blob/HEAD/packages/plugins/typescript/typescript/CHANGELOG.md#611)
[Compare Source](https://github.com/dotansimha/graphql-code-generator/compare/@graphql-codegen/typescript@6.1.0...@graphql-codegen/typescript@6.1.1)
##### Patch Changes
- [#​11019](https://github.com/dotansimha/graphql-code-generator/pull/11019)
[`eae0e62`](https://github.com/dotansimha/graphql-code-generator/commit/eae0e6263d658333069784969b6e13bbabccee52)
Thanks [@​eddeee888](https://github.com/eddeee888)! - Fix type errors in `plugin-helpers` under
`strict: true`:
- `@graphql-codegen/plugin-helpers`: `ProfilerEvent.cat` is optional, matching the Trace Event
format and `Profiler.run`'s optional `cat`. `FederationMeta`'s reference selection sets are
typed recursively (`{ [field: string]: true | ReferenceSelectionSet }`), matching the nested
selections `@key`/`@requires`/`@provides` produce. `oldVisit`'s `visitor` param is typed as
`OldVisitor`: `enter` and `leave` maps keyed by AST node kind, whose callbacks receive the typed
node plus graphql's `key`, `parent`, `path` and `ancestors`. Federation directives missing their
`fields` argument, and operations whose root type is missing from the schema, throw a
descriptive error.
- `@graphql-codegen/typescript` and `@graphql-codegen/typescript-operations`: the
`InputValueDefinition` visitor methods take `path` and `ancestors` as required params, since the
visitor always passes them.
Generated output is unchanged.
- [#​11014](https://github.com/dotansimha/graphql-code-generator/pull/11014)
[`7a376ef`](https://github.com/dotansimha/graphql-code-generator/commit/7a376effc2dcb7ac8decaf53c2c18eb0e28e71e6)
Thanks [@​eddeee888](https://github.com/eddeee888)! - Fix type errors in `typescript` under
`strict: true` by typing the shared visitor methods it overrides:
- `@graphql-codegen/visitor-plugin-common`: adds `NormalizedDeclarationKindConfig` (every
declaration kind set), used by `normalizeDeclarationKind`, `DEFAULT_DECLARATION_KINDS` and
`ParsedTypesConfig.declarationKind`. `BaseTypesVisitor`'s `NamedType`, `ListType`,
`FieldDefinition`, `InputValueDefinition` and `UnionTypeDefinition` have typed visitor params
(`key` and `parent` are required, since the visitor always passes them), and
`ObjectTypeDefinition`, `EnumTypeDefinition` and `DirectiveDefinition` may return `null`.
- `@graphql-codegen/typescript`: skips document files without a `document` when collecting
introspection types, types the `TsVisitor` visitor params, and `TsVisitor.EnumTypeDefinition`
may return `null` like the introspection visitor's override.
Generated output is unchanged.
- Updated dependencies
\[[`43d0f65`](https://github.com/dotansimha/graphql-code-generator/commit/43d0f65c5a0f19a9743aef875e7a2ef3fe8c6e35),
[`82ebbb5`](https://github.com/dotansimha/graphql-code-generator/commit/82ebbb548b67eb8445cbc4ab71b782e65b29a973),
[`eae0e62`](https://github.com/dotansimha/graphql-code-generator/commit/eae0e6263d658333069784969b6e13bbabccee52),
[`1f7566f`](https://github.com/dotansimha/graphql-code-generator/commit/1f7566f0bead301b21d4f7da49a4bc6924d07ef3),
[`7a376ef`](https://github.com/dotansimha/graphql-code-generator/commit/7a376effc2dcb7ac8decaf53c2c18eb0e28e71e6),
[`3caccd3`](https://github.com/dotansimha/graphql-code-generator/commit/3caccd34f191c7e95b09ff8e80a426b8b133be62),
[`ccc0d5c`](https://github.com/dotansimha/graphql-code-generator/commit/ccc0d5c205842405dbe95f5b95aded5b5e487e8e)]:
- [@​graphql-codegen/plugin-helpers](https://github.com/graphql-codegen/plugin-helpers)@7.4.1
- [@​graphql-codegen/visitor-plugin-common](https://github.com/graphql-codegen/visitor-plugin-common)@7.2.8
</details>
<details>
<summary>dotansimha/graphql-code-generator (@​graphql-codegen/typescript-operations)</summary>
### [`v6.1.10`](https://github.com/dotansimha/graphql-code-generator/blob/HEAD/packages/plugins/typescript/operations/CHANGELOG.md#6110)
[Compare Source](https://github.com/dotansimha/graphql-code-generator/compare/@graphql-codegen/typescript-operations@6.1.9...@graphql-codegen/typescript-operations@6.1.10)
##### Patch Changes
- [#​11019](https://github.com/dotansimha/graphql-code-generator/pull/11019)
[`eae0e62`](https://github.com/dotansimha/graphql-code-generator/commit/eae0e6263d658333069784969b6e13bbabccee52)
Thanks [@​eddeee888](https://github.com/eddeee888)! - Fix type errors in `plugin-helpers` under
`strict: true`:
- `@graphql-codegen/plugin-helpers`: `ProfilerEvent.cat` is optional, matching the Trace Event
format and `Profiler.run`'s optional `cat`. `FederationMeta`'s reference selection sets are
typed recursively (`{ [field: string]: true | ReferenceSelectionSet }`), matching the nested
selections `@key`/`@requires`/`@provides` produce. `oldVisit`'s `visitor` param is typed as
`OldVisitor`: `enter` and `leave` maps keyed by AST node kind, whose callbacks receive the typed
node plus graphql's `key`, `parent`, `path` and `ancestors`. Federation directives missing their
`fields` argument, and operations whose root type is missing from the schema, throw a
descriptive error.
- `@graphql-codegen/typescript` and `@graphql-codegen/typescript-operations`: the
`InputValueDefinition` visitor methods take `path` and `ancestors` as required params, since the
visitor always passes them.
Generated output is unchanged.
- [#​11009](https://github.com/dotansimha/graphql-code-generator/pull/11009)
[`1f7566f`](https://github.com/dotansimha/graphql-code-generator/commit/1f7566f0bead301b21d4f7da49a4bc6924d07ef3)
Thanks [@​eddeee888](https://github.com/eddeee888)! - Fix type errors in `typescript-operations`
under `strict: true` by widening the shared types it calls into:
- `@graphql-codegen/plugin-helpers`: `Types.ComplexPluginOutput`'s `prepend` and `append` now
accept `null` items. Core already skipped them.
- `@graphql-codegen/visitor-plugin-common`: `DeclarationBlock.withComment` accepts `undefined`,
`parseEnumValues`'s `mapOrStr` is optional (it already defaulted to `{}`),
`ImportSource.namespace` accepts `null`, and `optimizeOperations`'s `includeFragments` is
optional.
- `@graphql-codegen/typescript-operations`: skips document files without a `document`, and no
longer throws when called without the plugin info argument.
Generated output is unchanged.
- Updated dependencies
\[[`43d0f65`](https://github.com/dotansimha/graphql-code-generator/commit/43d0f65c5a0f19a9743aef875e7a2ef3fe8c6e35),
[`82ebbb5`](https://github.com/dotansimha/graphql-code-generator/commit/82ebbb548b67eb8445cbc4ab71b782e65b29a973),
[`eae0e62`](https://github.com/dotansimha/graphql-code-generator/commit/eae0e6263d658333069784969b6e13bbabccee52),
[`1f7566f`](https://github.com/dotansimha/graphql-code-generator/commit/1f7566f0bead301b21d4f7da49a4bc6924d07ef3),
[`7a376ef`](https://github.com/dotansimha/graphql-code-generator/commit/7a376effc2dcb7ac8decaf53c2c18eb0e28e71e6),
[`3caccd3`](https://github.com/dotansimha/graphql-code-generator/commit/3caccd34f191c7e95b09ff8e80a426b8b133be62),
[`ccc0d5c`](https://github.com/dotansimha/graphql-code-generator/commit/ccc0d5c205842405dbe95f5b95aded5b5e487e8e)]:
- [@​graphql-codegen/plugin-helpers](https://github.com/graphql-codegen/plugin-helpers)@7.4.1
- [@​graphql-codegen/visitor-plugin-common](https://github.com/graphql-codegen/visitor-plugin-common)@7.2.8
</details>
---
### Configuration
📅 **Schedule**: (UTC)
- Branch creation
- At any time (no schedule defined)
- Automerge
- At any time (no schedule defined)
🚦 **Automerge**: Enabled.
♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box
---
This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMzMuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjEzMy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This PR contains the following updates:
7.4.3→7.4.46.1.0→6.1.16.1.9→6.1.10Release Notes
dotansimha/graphql-code-generator (@graphql-codegen/cli)
v7.4.4Compare Source
Patch Changes
#11025
43d0f65Thanks @BuddhaBing! - Widen
Types.SchemaWithLoaderOptions['loader']to accept a custom loader function(
CustomSchemaLoaderFn) in addition to a path string.A per-entry
schemacustom loader ({ '<pointer>': { loader, ...options } }) is resolved by@graphql-tools/load'suseCustomLoader, which already accepts either a path string (resolvedvia
require()) or a function value at runtime (typeof loaderPointer === 'function'). Only theTypeScript type restricted
loadertostring, forcing consumers who pass an imported loaderfunction (or a class instance exposing a bound
loaderproperty) to cast theschemaarray tobypass the type error, even though it worked correctly at runtime.
This is additive and backward compatible —
loader: stringcontinues to type-check exactly asbefore.
Also fixes a schema-cache collision for function loaders in
@graphql-codegen/cli: the cache keyis
JSON.stringify(schemaPointerMap), andJSON.stringifydrops functions, so twogeneratestargets using different loader functions for the same pointer
(
{ 'schema.graphql': { loader: fnA } }vs{ loader: fnB }) both keyed as{"schema.graphql":{}}and the second silently reused the first's schema. Function values are nowkeyed by object identity (via the existing
getJsObjectId), so distinct loaders load separatelywhile one function reused across targets still loads once.
#11020
82ebbb5Thanks @eddeee888! - Fix type errors in
cliunderstrict: true:@graphql-codegen/cli:loadCodegenConfigreturnsPromise<LoadCodegenConfigResult | null>,matching the
nullit resolves to when no config file is found.YamlCliFlagsincludes thekebab-case
ignore-no-documents,emit-legacy-common-js-importsandimport-extensionflagsthat the CLI reads.
CodegenContext.filepathis optional, and watch mode only watches theconfig file when the context has a
filepath.CodegenContext.getConfig()without an argumentreturns
Types.Config, andgetConfig(extraConfig)returnsT & Types.Config.CodegenContext.checkModeStaleFilesis typed asstring[]. Adds@types/yargs,@types/babel__generatorand@types/babel__templateas dev dependencies.@graphql-codegen/plugin-helpers:normalizeInstanceOrArrayandnormalizeConfigacceptnullandundefined, returning[].Generated output is unchanged.
Updated dependencies
[
43d0f65,82ebbb5,e972b6d,eae0e62,1f7566f]:dotansimha/graphql-code-generator (@graphql-codegen/typescript)
v6.1.1Compare Source
Patch Changes
#11019
eae0e62Thanks @eddeee888! - Fix type errors in
plugin-helpersunderstrict: true:@graphql-codegen/plugin-helpers:ProfilerEvent.catis optional, matching the Trace Eventformat and
Profiler.run's optionalcat.FederationMeta's reference selection sets aretyped recursively (
{ [field: string]: true | ReferenceSelectionSet }), matching the nestedselections
@key/@requires/@providesproduce.oldVisit'svisitorparam is typed asOldVisitor:enterandleavemaps keyed by AST node kind, whose callbacks receive the typednode plus graphql's
key,parent,pathandancestors. Federation directives missing theirfieldsargument, and operations whose root type is missing from the schema, throw adescriptive error.
@graphql-codegen/typescriptand@graphql-codegen/typescript-operations: theInputValueDefinitionvisitor methods takepathandancestorsas required params, since thevisitor always passes them.
Generated output is unchanged.
#11014
7a376efThanks @eddeee888! - Fix type errors in
typescriptunderstrict: trueby typing the shared visitor methods it overrides:@graphql-codegen/visitor-plugin-common: addsNormalizedDeclarationKindConfig(everydeclaration kind set), used by
normalizeDeclarationKind,DEFAULT_DECLARATION_KINDSandParsedTypesConfig.declarationKind.BaseTypesVisitor'sNamedType,ListType,FieldDefinition,InputValueDefinitionandUnionTypeDefinitionhave typed visitor params(
keyandparentare required, since the visitor always passes them), andObjectTypeDefinition,EnumTypeDefinitionandDirectiveDefinitionmay returnnull.@graphql-codegen/typescript: skips document files without adocumentwhen collectingintrospection types, types the
TsVisitorvisitor params, andTsVisitor.EnumTypeDefinitionmay return
nulllike the introspection visitor's override.Generated output is unchanged.
Updated dependencies
[
43d0f65,82ebbb5,eae0e62,1f7566f,7a376ef,3caccd3,ccc0d5c]:dotansimha/graphql-code-generator (@graphql-codegen/typescript-operations)
v6.1.10Compare Source
Patch Changes
#11019
eae0e62Thanks @eddeee888! - Fix type errors in
plugin-helpersunderstrict: true:@graphql-codegen/plugin-helpers:ProfilerEvent.catis optional, matching the Trace Eventformat and
Profiler.run's optionalcat.FederationMeta's reference selection sets aretyped recursively (
{ [field: string]: true | ReferenceSelectionSet }), matching the nestedselections
@key/@requires/@providesproduce.oldVisit'svisitorparam is typed asOldVisitor:enterandleavemaps keyed by AST node kind, whose callbacks receive the typednode plus graphql's
key,parent,pathandancestors. Federation directives missing theirfieldsargument, and operations whose root type is missing from the schema, throw adescriptive error.
@graphql-codegen/typescriptand@graphql-codegen/typescript-operations: theInputValueDefinitionvisitor methods takepathandancestorsas required params, since thevisitor always passes them.
Generated output is unchanged.
#11009
1f7566fThanks @eddeee888! - Fix type errors in
typescript-operationsunder
strict: trueby widening the shared types it calls into:@graphql-codegen/plugin-helpers:Types.ComplexPluginOutput'sprependandappendnowaccept
nullitems. Core already skipped them.@graphql-codegen/visitor-plugin-common:DeclarationBlock.withCommentacceptsundefined,parseEnumValues'smapOrStris optional (it already defaulted to{}),ImportSource.namespaceacceptsnull, andoptimizeOperations'sincludeFragmentsisoptional.
@graphql-codegen/typescript-operations: skips document files without adocument, and nolonger throws when called without the plugin info argument.
Generated output is unchanged.
Updated dependencies
[
43d0f65,82ebbb5,eae0e62,1f7566f,7a376ef,3caccd3,ccc0d5c]:Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR has been generated by Mend Renovate CLI.