Skip to content

Handle Enum resolvers#293

Merged
eddeee888 merged 9 commits into
master-nextfrom
handle-enum-type
Jun 12, 2024
Merged

Handle Enum resolvers#293
eddeee888 merged 9 commits into
master-nextfrom
handle-enum-type

Conversation

@eddeee888
Copy link
Copy Markdown
Owner

@eddeee888 eddeee888 commented Jun 9, 2024

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

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 9, 2024

🦋 Changeset detected

Latest commit: af558cf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@eddeee888/gcg-typescript-resolver-files Minor

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

@eddeee888
Copy link
Copy Markdown
Owner Author

/release-snapshot

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 9, 2024

✅ Successfully published package/s with tag pr293-run533-1!

@eddeee888
Copy link
Copy Markdown
Owner Author

/release-snapshot

@github-actions
Copy link
Copy Markdown
Contributor

✅ Successfully published package/s with tag pr293-run537-1!

@eddeee888
Copy link
Copy Markdown
Owner Author

/release-snapshot

@github-actions
Copy link
Copy Markdown
Contributor

✅ Successfully published package/s with tag pr293-run538-1!

@eddeee888 eddeee888 changed the base branch from master to master-next June 12, 2024 10:36
@eddeee888 eddeee888 merged commit 3472db2 into master-next Jun 12, 2024
@eddeee888 eddeee888 deleted the handle-enum-type branch June 12, 2024 10:36
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
@eddeee888 eddeee888 mentioned this pull request Jun 12, 2024
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant