Handle Enum resolvers#293
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: af558cf 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 |
Owner
Author
|
/release-snapshot |
Contributor
|
✅ Successfully published package/s with tag |
Closed
9a49c41 to
aa916ac
Compare
Owner
Author
|
/release-snapshot |
Contributor
|
✅ Successfully published package/s with tag |
Owner
Author
|
/release-snapshot |
Contributor
|
✅ Successfully published package/s with tag |
3 tasks
73d687c to
af558cf
Compare
eddeee888
added a commit
that referenced
this pull request
Jun 12, 2024
* Add logic to handle Enum types: wireup, mapper, resolverGeneration * Add e2e test for Enum mappers in auto-wireup test * Fix the need to alwasy having to add enum mapper when generating enum resolver files * Rebase tests to have default enum values * Add changeset * Fix unit tests * Ensure enums with mapper types are always generated to avoid runtime issues * Set up test for enum with mappers must have file generation * Update test snapshot
Merged
eddeee888
added a commit
that referenced
this pull request
Jun 30, 2024
* Handle Enum resolvers (#293) * Add logic to handle Enum types: wireup, mapper, resolverGeneration * Add e2e test for Enum mappers in auto-wireup test * Fix the need to alwasy having to add enum mapper when generating enum resolver files * Rebase tests to have default enum values * Add changeset * Fix unit tests * Ensure enums with mapper types are always generated to avoid runtime issues * Set up test for enum with mappers must have file generation * Update test snapshot * Ensure all allowed enums are generated to avoid runtime error (#296) * Add functionality to ensure all allowed fields are generated * Add changeset * Fix unit test * Update changeset * Fix validatePresetConfig tests * Use typescript resolvers meta to support `namingConvention` for generated types of GraphQL definitions (#301) * Use meta from generated types for resolver type names * Update e2e tests * Add changeset * Fix lint/unit test * Update e2e tests for namingConvention to capture all possible types * Add FIXME to update meta * Fix lint * Fix typo (#303) * Fix typo * Update baseline tests * Use meta for accurate resolvers map type (#304) * Temporarily use alpha version to test * Use resolversType from meta * Baseline test with typesPrefix for more coverage * Add changeset * Bump to latest version * Use schema-ast plugin (#307)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Handle Enum resolvers generation, autowireup and custom mappers.
A by-product of this change is that enum resolver types are generated by default now to support a smoother type wireup. I think this is an acceptable trade-off because we want users to be able to create enum resolver files without having to add mappers/enumValues to trigger enum resolver type generation
(codegen behaviour is not to generate enum type resolvers unless these are used)
Related: #265