Issue workflow progress
Progress of the issue based on the
Contributor Workflow
Describe the bug
optimizeDocumentNode: true fails to remove descriptions for operation/variable/fragment/etc. nodes in request documents.
To Reproduce Steps to reproduce the behavior:
https://stackblitz.com/edit/github-kwqmz3z2?file=document.graphql
Expected behavior
The description nodes are removed, leaving only semantically meaningful syntax.
Environment:
@graphql-codegen/client-preset: 5.1.1
@graphql-codegen/visitor-plugin-common: 6.1.0
@graphql-tools/optimize: 2.0.0
Proposed Fix:
The visit in removeDescriptions should apply transformNode to additional kinds OperationDefinition/VariableDefinition/FragmentDefinition/etc.
Issue workflow progress
Progress of the issue based on the
Contributor Workflow
Describe the bug
optimizeDocumentNode: truefails to remove descriptions for operation/variable/fragment/etc. nodes in request documents.To Reproduce Steps to reproduce the behavior:
https://stackblitz.com/edit/github-kwqmz3z2?file=document.graphql
Expected behavior
The description nodes are removed, leaving only semantically meaningful syntax.
Environment:
@graphql-codegen/client-preset: 5.1.1@graphql-codegen/visitor-plugin-common: 6.1.0@graphql-tools/optimize: 2.0.0Proposed Fix:
The
visitinremoveDescriptionsshould applytransformNodeto additional kindsOperationDefinition/VariableDefinition/FragmentDefinition/etc.