dotansimha / graphql-code-generator

A tool for generating code based on a GraphQL schema and GraphQL operations (query/mutation/subscription), with flexible support for custom plugins.
https://the-guild.dev/graphql/codegen/
MIT License
10.72k stars 1.31k forks source link

Fix abstract types not being handled when nested in object types #10014

Closed eddeee888 closed 6 days ago

eddeee888 commented 2 weeks ago

Description

This PR fixes a scenario where abstract types are not pointing to generated resolvers type correctly:

In said case, the object type B must use generated resolver types, otherwise, it may have type conflicts

Related https://github.com/dotansimha/graphql-code-generator/issues/10004

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

changeset-bot[bot] commented 2 weeks ago

🦋 Changeset detected

Latest commit: 1cb8fe58c02ee2f0d15d19961cce38129691fc6d

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

This PR includes changesets to release 9 packages | Name | Type | | ------------------------------------------ | ----- | | @graphql-codegen/visitor-plugin-common | Patch | | @graphql-codegen/typescript-resolvers | Patch | | @graphql-codegen/typescript-document-nodes | Patch | | @graphql-codegen/gql-tag-operations | Patch | | @graphql-codegen/typescript-operations | Patch | | @graphql-codegen/typed-document-node | Patch | | @graphql-codegen/typescript | Patch | | @graphql-codegen/graphql-modules-preset | Patch | | @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

github-actions[bot] commented 2 weeks ago

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets): Package Version Info
@graphql-codegen/visitor-plugin-common 5.3.1-alpha-20240702080245-1cb8fe58c02ee2f0d15d19961cce38129691fc6d npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-document-nodes 4.0.9-alpha-20240702080245-1cb8fe58c02ee2f0d15d19961cce38129691fc6d npm ↗︎ unpkg ↗︎
@graphql-codegen/gql-tag-operations 4.0.9-alpha-20240702080245-1cb8fe58c02ee2f0d15d19961cce38129691fc6d npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-operations 4.2.3-alpha-20240702080245-1cb8fe58c02ee2f0d15d19961cce38129691fc6d npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript-resolvers 4.2.1-alpha-20240702080245-1cb8fe58c02ee2f0d15d19961cce38129691fc6d npm ↗︎ unpkg ↗︎
@graphql-codegen/typed-document-node 5.0.9-alpha-20240702080245-1cb8fe58c02ee2f0d15d19961cce38129691fc6d npm ↗︎ unpkg ↗︎
@graphql-codegen/typescript 4.0.9-alpha-20240702080245-1cb8fe58c02ee2f0d15d19961cce38129691fc6d npm ↗︎ unpkg ↗︎
@graphql-codegen/client-preset 4.3.2-alpha-20240702080245-1cb8fe58c02ee2f0d15d19961cce38129691fc6d npm ↗︎ unpkg ↗︎
@graphql-codegen/graphql-modules-preset 4.0.9-alpha-20240702080245-1cb8fe58c02ee2f0d15d19961cce38129691fc6d npm ↗︎ unpkg ↗︎
github-actions[bot] commented 2 weeks ago
### 💻 Website Preview The latest changes are available as preview in: [https://4f3fc99c.graphql-code-generator.pages.dev](https://4f3fc99c.graphql-code-generator.pages.dev)