Is changing case of common initialisms a bad design ? #1918
Replies: 3 comments 7 replies
-
I agree on that, but I think I've got that covered in a - rather dusty - issue: #1383 |
Beta Was this translation helpful? Give feedback.
-
The issue is still bugging us. As a compromise, could you at least expose the information which "common initialisms" there are, so we could regard them in our code? |
Beta Was this translation helpful? Give feedback.
-
Not for people who like the current defaults! :) https://github.com/99designs/gqlgen/blob/master/codegen/templates/templates.go#L598-L642 has 44 lines if someone wanted to add that many config lines to entirely replace that default list (plus however many any new ones). If that config option is at the end of the gqlgen.yml file, I don't think it will be much of a burden to readability. |
Beta Was this translation helpful? Give feedback.
-
The list could go on forever, and it's not the job of the generator to stumble upon specific cases.
This is tied to a semantic context: for instance fields named cpu or ip may not be expected to be turned uppercase.
If I may, I would advice to let users provide themselves any list of strings they judge necessary to go through this transformation. Even the id case (be it Freudian or not, cf templates:449) is dubious IMHO.
Beta Was this translation helpful? Give feedback.
All reactions