-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat(presets/client): support enumsAsConst
option
#9981
Conversation
🦋 Changeset detectedLatest commit: 21e7d1f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Ah, I notice that this PR is duplicated of #9574, but this PR includes a test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please also update website/src/pages/plugins/presets/preset-client.mdx
+1 to this change, this would resolve several headaches for my org. |
Great work @azu, this would be an amazing change for us as well if it could get merged! Note: While waiting for the official change, you can throw this dirty little workaround into a package.json script to get the job done 😱 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Description
Add
enumsAsConst
to client presets.Related
enumsAsConst
for typescript plugin config #9072Edit:
This PR is duplicated of #9574, but this includes a test.
Type of change
Please delete options that are not relevant.
Screenshots/Sandbox (if appropriate/relevant):
Add Unit Test
How Has This Been Tested?
enumsAsConst
npm test
Test Environment:
@graphql-codegen/...
: latestChecklist:
Further comments
client preset already support
enumsAsType
.I think that it should support
enumsAsConst
too.enumsAsTypes
can't be used withclient-preset
· Issue #8471 · dotansimha/graphql-code-generator