We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
TypeScript enums have known issues: https://dev.to/ivanzm123/dont-use-enums-in-typescript-they-are-very-dangerous-57bh
This is an example of this with GraphQL types generated by NestJS:
Because if this, if I have a return value from an Prisma enum
By default, Prisma generates TS enums as consts, instead of enums. I recommend doing that.
GraphQL Codegen has options to help address this: https://the-guild.dev/graphql/codegen/plugins/typescript/typescript#constenums https://the-guild.dev/graphql/codegen/plugins/typescript/typescript#enumsastypes
I propose exposing this and other GraphQL codegen options in the API
enum consts are backwards compatible, so this shouldn't hurt anything
enum consts just work better all around!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is there an existing issue that is already proposing this?
Is your feature request related to a problem? Please describe it
TypeScript enums have known issues:
https://dev.to/ivanzm123/dont-use-enums-in-typescript-they-are-very-dangerous-57bh
This is an example of this with GraphQL types generated by NestJS:
Because if this, if I have a return value from an Prisma enum
Describe the solution you'd like
By default, Prisma generates TS enums as consts, instead of enums. I recommend doing that.
GraphQL Codegen has options to help address this:
https://the-guild.dev/graphql/codegen/plugins/typescript/typescript#constenums
https://the-guild.dev/graphql/codegen/plugins/typescript/typescript#enumsastypes
I propose exposing this and other GraphQL codegen options in the API
Teachability, documentation, adoption, migration strategy
enum consts are backwards compatible, so this shouldn't hurt anything
What is the motivation / use case for changing the behavior?
enum consts just work better all around!
The text was updated successfully, but these errors were encountered: