Ability to specify a suffix (or prefix) for generated type names #1991
Closed
SankarshanDudhate
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Apologies if this has been suggested before but I couldn't find anything on a similar note. I'm facing a problem where my java types and graphql types have the same name and that's causing a lot of confusion (mostly in the tests but in the mappers as well in some cases). e.g. I have a type called
Taskand a graphql equivalent of the same name. However, the two of them have a few differences in the fields contained.Of course, I can suffix all my Graphql types e.g.
TaskGqlTypebut that will look very odd compared the rest of our schema which is part of nodejs based microservices (we have federated schema).One solution to this could be to suffix only the types generated by the codegen. Which means, my graphql type named
Taskwould generate a java type of the patternTask${suffix}. This way, we can avoid polluting the graphql schema with unnecessary suffixes.Does this sound like a reasonable ask? Has somebody else faced such an issue? If so, how did you work around it?
Update: Closing as this is not the appropriate place to discuss this. Forgive my foolishness.
Beta Was this translation helpful? Give feedback.
All reactions