-
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
[resolvers] Add generateInternalResolversIfNeeded.__isTypeOf
#10138
base: master
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: da2e301 The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 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 |
@@ -675,8 +674,8 @@ export class BaseResolversVisitor< | |||
protected _hasReferencedResolversUnionTypes = false; | |||
protected _hasReferencedResolversInterfaceTypes = false; | |||
protected _resolversUnionTypes: Record<string, string> = {}; | |||
protected _resolversUnionParentTypes: Record<string, string> = {}; |
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.
_resolversUnionParentTypes
was used previously but not needed anymore. Removing in this PR as a drive-by
f3d0d03
to
600a615
Compare
🚀 Snapshot Release (
|
Package | Version | Info |
---|---|---|
@graphql-codegen/visitor-plugin-common |
5.5.0-alpha-20241014102122-da2e301d5dcf60afe319d5c2bc73b5b0d5fd3be7 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-document-nodes |
4.0.11-alpha-20241014102122-da2e301d5dcf60afe319d5c2bc73b5b0d5fd3be7 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/gql-tag-operations |
4.0.11-alpha-20241014102122-da2e301d5dcf60afe319d5c2bc73b5b0d5fd3be7 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-operations |
4.3.1-alpha-20241014102122-da2e301d5dcf60afe319d5c2bc73b5b0d5fd3be7 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-resolvers |
4.4.0-alpha-20241014102122-da2e301d5dcf60afe319d5c2bc73b5b0d5fd3be7 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typed-document-node |
5.0.11-alpha-20241014102122-da2e301d5dcf60afe319d5c2bc73b5b0d5fd3be7 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript |
4.1.1-alpha-20241014102122-da2e301d5dcf60afe319d5c2bc73b5b0d5fd3be7 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/client-preset |
4.5.0-alpha-20241014102122-da2e301d5dcf60afe319d5c2bc73b5b0d5fd3be7 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/graphql-modules-preset |
4.0.11-alpha-20241014102122-da2e301d5dcf60afe319d5c2bc73b5b0d5fd3be7 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/plugin-helpers |
5.1.0-alpha-20241014102122-da2e301d5dcf60afe319d5c2bc73b5b0d5fd3be7 |
npm ↗︎ unpkg ↗︎ |
generateInternalResolversIfNeeded. __isTypeOf
generateInternalResolversIfNeeded.__isTypeOf
💻 Website PreviewThe latest changes are available as preview in: https://dab09720.graphql-code-generator.pages.dev |
Description
This PR compliments #9989 and should be merged after.
Previously, we always generate
__isTypeOf
type which means consumers may try to implement it, even when they don't have to.This PR adds
generateInternalResolversIfNeeded.__isTypeOf
to conditionally generate this resolver only for implementing types or union membersType of change
Please delete options that are not relevant.
How Has This Been Tested?