Open hecticme opened 2 weeks ago
Latest commit: 96c266714abe4680f5b6d67da7d60fb494666830
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Description
When handling anonymous operation name,
BaseDocumentsVisitor
calls theconvertName()
method twice. This leads to duplicated suffix if a user provide a customnamingConvention
function.Related #10012
Type of change
Screenshots/Sandbox (if appropriate/relevant):
https://stackblitz.com/edit/gql-codgen-13f1zd
How Has This Been Tested?
I have described the problem in the related issue. The test added in this PR will reflect that.
Test Environment:
graphql
version: 16.8.2@graphql-codegen/cli
version: 5.0.2Checklist:
Further comments
The main problem that I want to address is that the operation name does not match with itself inside Typed Document Node.