-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
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
[Bug?]: Cannot generate enum types with GraphQL Codegen #6025
Labels
bug/confirmed
We have confirmed this is a bug
Comments
hey @tyteen4a03, we just discussed this one and will move on it soon—thanks for reporting! |
enumAsTypes seems to be hardcoded here
|
Note that the expected result for codegen for the enum when export enum NameStatus {
NAME_APPROVED = 'NAME_APPROVED',
NAME_CHANGING = 'NAME_CHANGING',
NAME_DENIED = 'NAME_DENIED',
NAME_REQUESTED = 'NAME_REQUESTED'
} when export type NameStatus =
| 'NAME_APPROVED'
| 'NAME_CHANGING'
| 'NAME_DENIED'
| 'NAME_REQUESTED'; Which I can generate by changing
So, while I can set the config for settings like:
which change the case, the |
Closed
3 tasks
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What's not working?
A prisma schema:
ends up being this in GQL Schema:
All fine thus far. But when you generate the TypeScript type it becomes:
I put in this into codegen.yml at the root:
(noExport just to test if it's the file that's not getting passed down); only the noExport one got passed down and affected the GraphQL typedefs output. The enumAsTypes option got ignored and I'm stuck with no enums.
How do we reproduce the bug?
No response
What's your environment? (If it applies)
System: OS: macOS 12.4 Shell: 5.9 - /opt/homebrew/bin/zsh Binaries: Node: 16.14.2 - /private/var/folders/cg/srfblk2d7bq2dw2tqjt94qkh0000gn/T/xfs-2b3a723a/node Yarn: 3.2.1 - /private/var/folders/cg/srfblk2d7bq2dw2tqjt94qkh0000gn/T/xfs-2b3a723a/yarn Databases: SQLite: 3.37.0 - /usr/bin/sqlite3 Browsers: Chrome: 103.0.5060.134 Firefox: 102.0.1 Safari: 15.5 npmPackages: @redwoodjs/core: 2.1.0 => 2.1.0
Are you interested in working on this?
The text was updated successfully, but these errors were encountered: