-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix abstract types not being handled when nested in object types #10014
Conversation
🦋 Changeset detectedLatest commit: 1cb8fe5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
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 |
🚀 Snapshot Release (
|
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 ↗︎ |
💻 Website PreviewThe latest changes are available as preview in: https://4f3fc99c.graphql-code-generator.pages.dev |
baseType: GraphQLObjectType, | ||
result: { | ||
isObjectWithAbstractType: boolean; | ||
checkedTypesWithNestedAbstractTypes: Record<string, { hasNestedAbstractTypes: 'yes' | 'no' | 'checking' }>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can it have a better name ? for me, anything which starts with has*
should be a boolean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True! It started as boolean
but then I saw the need to change to 3 different options, but didn't review the name.
Do you have suggestions? I'm thinking a few options but I'm unsure about them:
value
result
checkStatus
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checkStatus For me is good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolversNonOptionalTypename
tests are moved to ts-resolvers.config.ResolversNonOptionalTypename
to further split tests
…Types which handles typename correctly
a031a0b
to
1cb8fe5
Compare
@eddeee888 Hi, are there any config options to revert this behavior? On |
Hi @dylanwulf, |
No problem, issue opened here: #10084 |
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 #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