enum cases aren't preserved #8856
Answered
by
decaf-dev
joeprivettsmart
asked this question in
Q&A
-
|
I have an enum in my code that looks like this: after running the type graphql generator, it ends up like this: Why doesn't it preserve the original case? |
Beta Was this translation helpful? Give feedback.
Answered by
decaf-dev
Jan 28, 2023
Replies: 1 comment
-
|
I just found an answer in the documentation. You need to supply a import { CodegenConfig } from '@graphql-codegen/cli'
const config: CodegenConfig = {
// ...
config: { namingConvention: 'keep' }
// ...
}
export default configLink: https://the-guild.dev/graphql/codegen/docs/config-reference/naming-convention |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
joeprivettsmart
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I just found an answer in the documentation. You need to supply a
namingConventionkey with the valuekeepto your configuration file.Link: https://the-guild.dev/graphql/codegen/docs/config-reference/naming-convention