graphql-code-generator icon indicating copy to clipboard operation
graphql-code-generator copied to clipboard

feat(presets/client): support enumValues option

Open yangirov opened this issue 1 year ago β€’ 2 comments

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 enumValues with enum replacement. Ran yarn 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.

yangirov avatar Aug 22 '24 13:08 yangirov

πŸ¦‹ 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

changeset-bot[bot] avatar Aug 22 '24 13:08 changeset-bot[bot]

@dotansimha @saihaj Could you please review and run tests on this pull request?

Thanks!

yangirov avatar Aug 26 '24 06:08 yangirov

@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.

nathan-knight avatar May 06 '25 19:05 nathan-knight

@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!

yangirov avatar May 16 '25 09:05 yangirov

@eddeee888 @dotansimha ping

yangirov avatar Jun 02 '25 16:06 yangirov

@yangirov I think you tagged me by mistake, I am not the maintainer of the project πŸ˜…

dodomorandi avatar Jun 02 '25 16:06 dodomorandi