graphql-code-generator
graphql-code-generator copied to clipboard
feat(presets/client): support enumValues option
Description
Add support for enumValues in @graphql-codegen/client-preset.
Related https://github.com/dotansimha/graphql-code-generator/issues/8562#issuecomment-1643499311
Type of change
Please delete options that are not relevant.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
Screenshots/Sandbox (if appropriate/relevant):
N/A
How Has This Been Tested?
- Added a test case for
enumValueswith enum replacement. Ranyarn test.
Test Environment:
- OS: macOS Sonoma 14.6.1
@graphql-codegen/client-preset: 4.3.3- NodeJS: 20.14.0
Checklist:
- [x] I have followed the CONTRIBUTING doc and the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream modules
Further comments
The @graphql-codegen/client-preset package now supports the enumValues option.
π¦ Changeset detected
Latest commit: b96320c89dd0598bb5c1cfc6b29dcaf328548451
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
| Name | Type |
|---|---|
| @graphql-codegen/client-preset | Patch |
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
@dotansimha @saihaj Could you please review and run tests on this pull request?
Thanks!
@dotansimha any chance someone can take a look at this? It's been 9 months and I've been maintaining a patch to do this in my project for a very long time.
@dotansimha @eddeee888 this PR adds enumValues support to client-preset β small but important fix.
Tests pass, everything works. Itβs been open for 9 months β would be great to get it merged π
Thanks!
@eddeee888 @dotansimha ping
@yangirov I think you tagged me by mistake, I am not the maintainer of the project π