-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GraphQL Name Collision in overly aggressive "ToGo" conversion #2321
Comments
dcarbone
changed the title
"ToGo" is unecessarily aggressive
"ToGo" is unnecessarily aggressive
Aug 11, 2022
dcarbone
added a commit
to dcarbone/gqlgen
that referenced
this issue
Aug 12, 2022
2 tasks
dcarbone
added a commit
to dcarbone/gqlgen
that referenced
this issue
Aug 12, 2022
dcarbone
added a commit
to dcarbone/gqlgen
that referenced
this issue
Aug 12, 2022
StevenACoffman
changed the title
"ToGo" is unnecessarily aggressive
Case Insensitive GraphQL Name Collision in "ToGo"
Aug 16, 2022
StevenACoffman
changed the title
Case Insensitive GraphQL Name Collision in "ToGo"
GraphQL Name Collision in overly aggressive "ToGo"
Aug 16, 2022
StevenACoffman
changed the title
GraphQL Name Collision in overly aggressive "ToGo"
GraphQL Name Collision in overly aggressive "ToGo" conversion
Aug 16, 2022
StevenACoffman
pushed a commit
that referenced
this issue
Aug 18, 2022
* Initial pass at #2321 * using ReplaceAllStringLiteral * fixing wordInfo template test * bumping linter timeout to 5m * comment cleanup * some cleanup, adding "ToGoPrivateModelName" func * adding "ToGoPrivateModelName" func * refactoring word walker impl and tests * hopefully making linter happy
closed with #2322 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What happened?
I have a GraphQL schema with the following Enum:
And so-on. This, unfortunately, is forcibly turned into:
The obvious issue here is that we have two consts with the same name, but different values.
What did you expect?
The consts to be defined as
or some derivative thereof. Perhaps with an underscore in between the
$enum.Name
and.Name
to make them more readable.I am working on a PR on this, but I wanted to open this and get some feedback on possible alternative solutions.
Minimal graphql.schema and models to reproduce
versions
v0.17.13
go1.18.5
The text was updated successfully, but these errors were encountered: