Skip to content
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

Use typescript resolvers meta to support namingConvention for generated types of GraphQL definitions #301

Merged
merged 7 commits into from
Jun 13, 2024

Conversation

eddeee888
Copy link
Owner

@eddeee888 eddeee888 commented Jun 13, 2024

@graphql-codegen/typescript-resolvers@4.1.0 creates meta object after generation, implemented in this PR

With this logic, we can now fully support namingConvention. We can remove the warning message in v1.0, as we can use this time to trial run it.

Note: this PR only handles the generated resolver types. We still have the Root resolver type to handle

Copy link

changeset-bot bot commented Jun 13, 2024

🦋 Changeset detected

Latest commit: 7f465d5

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 eddeee888 changed the title Use typescript resolvers meta Use typescript resolvers meta to fully support namingConvention Jun 13, 2024
@eddeee888 eddeee888 changed the title Use typescript resolvers meta to fully support namingConvention Use typescript resolvers meta to support namingConvention for generated types of GraphQL definitions Jun 13, 2024
@eddeee888 eddeee888 merged commit 47879a0 into master-next Jun 13, 2024
9 checks passed
@eddeee888 eddeee888 deleted the use-typescript-resolvers-meta branch June 13, 2024 12:10
@eddeee888 eddeee888 mentioned this pull request Jun 13, 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