I've encountered a minor discrepancy with the @graphql-codegen/typescript plugin, while adding this plugin to our setup:
The official typescript plugin defaults to preserving underscores when creating types based on a GraphQL schema, as documented under namingConvention on this page. Our GraphQL endpoint stitches all our microservices schemas, prefixing with the service name, making the underscore a very welcome addition when we reference types in our code, but right now this is conflicting with the case transform for this plugin.
Can a similar transformUnderscores option be added to this plugin?
Hi, thank you for creating this plugin 🙏
I've encountered a minor discrepancy with the
@graphql-codegen/typescript
plugin, while adding this plugin to our setup:The official typescript plugin defaults to preserving underscores when creating types based on a GraphQL schema, as documented under
namingConvention
on this page. Our GraphQL endpoint stitches all our microservices schemas, prefixing with the service name, making the underscore a very welcome addition when we reference types in our code, but right now this is conflicting with the case transform for this plugin.Can a similar
transformUnderscores
option be added to this plugin?The most straight forward implementation, I think, would be to reimplement this piece of code: https://github.com/dotansimha/graphql-code-generator/blob/6734c58055d283f051bf32f115f2308000e56431/packages/plugins/other/visitor-plugin-common/src/utils.ts#L253-L262