@graphql-codegen/core@6.2.1
Patch Changes
-
#10991
dc70125
Thanks @eddeee888! - Skip documents without adocumentAST when
validating documents against the schema, instead of passingundefinedto validation. Generated
output from the CLI is unchanged. -
Updated dependencies
[1d1153b]:- @graphql-codegen/plugin-helpers@7.4.0
@graphql-codegen/add@7.1.1
Patch Changes
-
#10986
9597b5b
Thanks @eddeee888! - The plugin output'scontentis now an empty
string ('') instead ofnullwhenplacementisprependorappend. This matches the
ComplexPluginOutputtype (content: string). Code that calls the plugin directly and checks
content === nullshould check for an empty string instead. Generated files are unchanged. -
Updated dependencies
[1d1153b]:- @graphql-codegen/plugin-helpers@7.4.0
@graphql-codegen/visitor-plugin-common@7.2.6
Patch Changes
-
#10982
e5361bc
Thanks @eddeee888! - Fix out-of-memory errors with deeply nested,
widely reused fragments
(#10940).The type cache used while generating selection set types was keyed by every fragment-expanded
field path, so its keys grew exponentially with fragment nesting. Keys are now built from the
selection set as written, referencing fragment spreads by name, so they stay linear in the size of
the documents. The exportedgetFieldNameshelper from@graphql-codegen/visitor-plugin-common,
which built those expanded paths, is removed. -
#10993
be69e9d
Thanks @eddeee888! - TypegetConfigValue'svalueparameter as
T | null | undefined, so the result is non-nullable when a non-nullable default is given. -
Updated dependencies
[1d1153b]:- @graphql-codegen/plugin-helpers@7.4.0
@graphql-codegen/typescript-document-nodes@6.1.1
Patch Changes
-
#10990
df288d8
Thanks @eddeee888! - Skip documents without adocumentAST
instead of throwing fromconcatASTwhen the plugin is called directly with one. Generated output
from the CLI is unchanged. -
Updated dependencies
[e5361bc,
1d1153b,
be69e9d]:- @graphql-codegen/visitor-plugin-common@7.2.6
- @graphql-codegen/plugin-helpers@7.4.0
@graphql-codegen/typescript-operations@6.1.8
Patch Changes
-
#10982
e5361bc
Thanks @eddeee888! - Fix out-of-memory errors with deeply nested,
widely reused fragments
(#10940).The type cache used while generating selection set types was keyed by every fragment-expanded
field path, so its keys grew exponentially with fragment nesting. Keys are now built from the
selection set as written, referencing fragment spreads by name, so they stay linear in the size of
the documents. The exportedgetFieldNameshelper from@graphql-codegen/visitor-plugin-common,
which built those expanded paths, is removed. -
Updated dependencies
[e5361bc,
1d1153b,
be69e9d]:- @graphql-codegen/visitor-plugin-common@7.2.6
- @graphql-codegen/plugin-helpers@7.4.0
@graphql-codegen/typed-document-node@7.1.1
Patch Changes
-
#10994
1d1153b
Thanks @eddeee888! - Skip documents without adocumentAST
instead of throwing fromconcatASTwhen the plugin is called directly with one, and don't add an
empty import whendocumentNodeImporthas no module. Generated output from the CLI is unchanged. -
Updated dependencies
[e5361bc,
1d1153b,
be69e9d]:- @graphql-codegen/visitor-plugin-common@7.2.6
- @graphql-codegen/plugin-helpers@7.4.0
@graphql-codegen/graphql-modules-preset@6.1.1
Patch Changes
-
#10993
be69e9d
Thanks @eddeee888! - Skip sources without alocationwhen
grouping sources by module, instead of throwing frompath.normalize, and skip sources without a
documentAST when building each module's document. Generated output from the CLI is unchanged. -
Updated dependencies
[e5361bc,
1d1153b,
be69e9d]:- @graphql-codegen/visitor-plugin-common@7.2.6
- @graphql-codegen/plugin-helpers@7.4.0
@graphql-codegen/testing@5.0.5
Patch Changes
-
#10992
024fa34
Thanks @eddeee888! - MakevalidateTs/compileTstype-check
understrict: true: fall back to the compiler host's script target when the passed options have
notarget, and only compute a diagnostic's line/column when it has astartposition. Adds
@types/common-tagsas a devDependency. -
Updated dependencies
[1d1153b]:- @graphql-codegen/plugin-helpers@7.4.0
@graphql-codegen/plugin-helpers@7.4.0
Minor Changes
-
#10994
1d1153b
Thanks @eddeee888! - TypeoldVisit's return value instead of
returningany. For aDocumentNode, the result is nowOldVisitDocumentResult, whose
definitionsareunknown[]because leave visitors can replace each definition with any value
(usually a string), and definitions without a leave visitor stay as AST nodes. When aDocument
leave visitor returns its own value, pass its type asoldVisit<TResult>(...). For other roots,
the result isunknownunlessTResultis given.Code that used the result as
any, for example
const definitions: string[] = result.definitions, now needs to filter for strings, cast
(result.definitions as string[]), or passoldVisit<any>(...). Runtime behavior and generated
output are unchanged.