-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[typescript-resolvers] Add addInterfaceFieldResolverTypes option #10449
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
Conversation
… shared field inherit behaviour
🦋 Changeset detectedLatest commit: 991afbf 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 |
6.1.0-alpha-20251005124346-991afbf77854938477209f677661e6b12c413c71 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-document-nodes |
5.0.2-alpha-20251005124346-991afbf77854938477209f677661e6b12c413c71 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/gql-tag-operations |
5.0.2-alpha-20251005124346-991afbf77854938477209f677661e6b12c413c71 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-operations |
5.0.2-alpha-20251005124346-991afbf77854938477209f677661e6b12c413c71 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-resolvers |
5.1.0-alpha-20251005124346-991afbf77854938477209f677661e6b12c413c71 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typed-document-node |
6.0.2-alpha-20251005124346-991afbf77854938477209f677661e6b12c413c71 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript |
5.0.2-alpha-20251005124346-991afbf77854938477209f677661e6b12c413c71 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/client-preset |
5.0.3-alpha-20251005124346-991afbf77854938477209f677661e6b12c413c71 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/graphql-modules-preset |
5.0.3-alpha-20251005124346-991afbf77854938477209f677661e6b12c413c71 |
npm ↗︎ unpkg ↗︎ |
💻 Website PreviewThe latest changes are available as preview in: https://pr-10449.graphql-code-generator.pages.dev |
Description
We removed
onlyResolveTypeForInterfaces
option here and made Interface not have resolvers for shared fields. This is because this is the default GraphQL resolver behaviour.However, some tools like
@graphql-tools/schema
's makeExecutableSchema may change this default behaviour withinheritResolversFromInterfaces: true
option so users only have to declare the shared field resolvers once in Interfaces, and implementing types can inherit said resolvers (if none available at the implementing types level).This PR adds
addInterfaceFieldResolverTypes
as a replacement foronlyResolveTypeForInterfaces
so users must consciously turn this option on when using with tools that customise the behaviours.Relevant questions: #10218 (comment), #10438 (comment)
Type of change
How Has This Been Tested?