René's URL Explorer Experiment


Title: Backport to 26.1: Fix covariance checks for SDL type extensions by andimarek · Pull Request #4444 · graphql-java/graphql-java · GitHub

Open Graph Title: Backport to 26.1: Fix covariance checks for SDL type extensions by andimarek · Pull Request #4444 · graphql-java/graphql-java

X Title: Backport to 26.1: Fix covariance checks for SDL type extensions by andimarek · Pull Request #4444 · graphql-java/graphql-java

Description: Backport of #4420 to the 26.x maintenance branch. Problem GraphQL Java incorrectly rejected valid covariant field return types when the subtype relationship was introduced by an SDL extension rather than declared on the base type. Object extension example In this schema, Dog implements Pet through an extension. Returning Dog for a field declared as Pet is valid covariance: type Query { base: Base } interface Pet { id: ID } type Dog { id: ID } extend type Dog implements Pet type Base { foo: String } interface PetContainer { pet: Pet } extend type Base implements PetContainer { pet: Dog } The schema was incorrectly rejected because the covariance check only inspected the base definition of Dog and did not see extend type Dog implements Pet. Interface extension example The same problem affected interfaces inheriting from other interfaces through extensions: type Query { base: Base } interface Pet { id: ID } interface WorkingPet { id: ID } extend interface WorkingPet implements Pet interface PetContainer { pet: Pet } type Base implements PetContainer { pet: WorkingPet } WorkingPet is a valid covariant return type for Pet, but the extension-based relationship was previously ignored. Union extension example Union members introduced through extensions were also missed: type Query { base: Base } type Cat { id: ID } type Dog { id: ID } union Pets = Cat extend union Pets = Dog interface PetContainer { pet: Pets } type Base implements PetContainer { pet: Dog } Dog is a valid subtype of Pets, but the previous check only inspected members declared on the base union. Summary TypeDefinitionRegistry stores base SDL definitions and extension definitions separately. This change makes the registry use the logical base-plus-extension relationships when: checking whether an object or interface is a possible type of an interface checking whether an object is a possible type of a union checking covariant field return types, including nested list and non-null wrappers finding object and interface implementations of an interface This matches graphql-js behavior. graphql-js materializes extensions into its schema types before subtype checks; GraphQL Java retains separate AST definitions and now combines them when answering the equivalent registry queries. Wrapped covariance The same relationship is preserved while recursively checking list and non-null wrappers: type Query { base: Base } interface Pet { id: ID } type Dog { id: ID } extend type Dog implements Pet interface PetContainer { pets: [Pet]! } type Base implements PetContainer { pets: [Dog!]! } [Dog!]! remains a valid subtype of [Pet]!. Unrelated types remain invalid Extension relationships are matched by their declared interface and do not make unrelated types compatible: type Query { base: Base } interface Pet { id: ID } interface Vehicle { id: ID } type Car { id: ID } extend type Car implements Vehicle interface PetContainer { pet: Pet } type Base implements PetContainer { pet: Car } This schema is still rejected because Car implements Vehicle, not Pet.

Open Graph Description: Backport of #4420 to the 26.x maintenance branch. Problem GraphQL Java incorrectly rejected valid covariant field return types when the subtype relationship was introduced by an SDL extension rathe...

X Description: Backport of #4420 to the 26.x maintenance branch. Problem GraphQL Java incorrectly rejected valid covariant field return types when the subtype relationship was introduced by an SDL extension rathe...

Opengraph URL: https://github.com/graphql-java/graphql-java/pull/4444

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:93c81077-5649-f776-c1f4-96ecc34753f6
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idAD28:3EED53:E0E771:12C6D0D:6AED47C2
html-safe-nonce8c88e7b206557a9f71f1e23b3ca138289e491a3eded62b7068d1da5daa3a27a9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRDI4OjNFRUQ1MzpFMEU3NzE6MTJDNkQwRDo2QUVENDdDMiIsInZpc2l0b3JfaWQiOiI1NjE2MDE1MjM0Mjg0MTI4MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaca0c577c5cb54431cb86874b1137da212541d3975f89242092548e079fbbd858c
hovercard-subject-tagpull_request:4317486832
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/graphql-java/graphql-java/pull/4444/files
twitter:imagehttps://avatars.githubusercontent.com/u/1706744?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1706744?s=400&v=4
og:image:altBackport of #4420 to the 26.x maintenance branch. Problem GraphQL Java incorrectly rejected valid covariant field return types when the subtype relationship was introduced by an SDL extension rathe...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None56fb42677ae87ed3e64410323d67980aa65d0485568a7858f874e7edfc6d1c11
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/graphql-java/graphql-java git https://github.com/graphql-java/graphql-java.git
octolytics-dimension-user_id14289921
octolytics-dimension-user_logingraphql-java
octolytics-dimension-repository_id38602457
octolytics-dimension-repository_nwographql-java/graphql-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id38602457
octolytics-dimension-repository_network_root_nwographql-java/graphql-java
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9c9a37e2423ed382cf39f70b5aa4b4858b40a3b0
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/graphql-java/graphql-java/pull/4444/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgraphql-java%2Fgraphql-java%2Fpull%2F4444%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgraphql-java%2Fgraphql-java%2Fpull%2F4444%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=graphql-java%2Fgraphql-java
Reloadhttps://github.com/graphql-java/graphql-java/pull/4444/files
Reloadhttps://github.com/graphql-java/graphql-java/pull/4444/files
Reloadhttps://github.com/graphql-java/graphql-java/pull/4444/files
graphql-javahttps://github.com/graphql-java
graphql-javahttps://github.com/graphql-java/graphql-java
Codehttps://github.com/graphql-java/graphql-java
Issues27 (27)https://github.com/graphql-java/graphql-java/issues
Pull requests32 (32)https://github.com/graphql-java/graphql-java/pulls
Discussionshttps://github.com/graphql-java/graphql-java/discussions
Actionshttps://github.com/graphql-java/graphql-java/actions
Projectshttps://github.com/graphql-java/graphql-java/projects
Wikihttps://github.com/graphql-java/graphql-java/wiki
Security and qualityhttps://github.com/graphql-java/graphql-java/security
Insightshttps://github.com/graphql-java/graphql-java/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fgraphql-java%2Fgraphql-java%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fgraphql-java%2Fgraphql-java%2Fissues%2Fnew%2Fchoose
andimarekhttps://github.com/andimarek
26.xhttps://github.com/graphql-java/graphql-java/tree/26.x
codex/backport-4420-to-26.xhttps://github.com/graphql-java/graphql-java/tree/codex/backport-4420-to-26.x
Conversation 1 https://github.com/graphql-java/graphql-java/pull/4444
Commits 1 https://github.com/graphql-java/graphql-java/pull/4444/commits
Checks 11 https://github.com/graphql-java/graphql-java/pull/4444/checks
Files changed https://github.com/graphql-java/graphql-java/pull/4444/files
Please reload this pagehttps://github.com/graphql-java/graphql-java/pull/4444/files
Backport to 26.1: Fix covariance checks for SDL type extensions https://github.com/graphql-java/graphql-java/pull/4444/files#top
Show all changes 1 commit https://github.com/graphql-java/graphql-java/pull/4444/files
8f74506 Fix covariance checks for SDL type extensions andimarek Jul 23, 2026 https://github.com/graphql-java/graphql-java/pull/4444/commits/8f7450621100e0ab43910519936e90106d3a39a9
Clear filters https://github.com/graphql-java/graphql-java/pull/4444/files
Please reload this pagehttps://github.com/graphql-java/graphql-java/pull/4444/files
Please reload this pagehttps://github.com/graphql-java/graphql-java/pull/4444/files
TypeDefinitionRegistry.java https://github.com/graphql-java/graphql-java/pull/4444/files#diff-f2b085da7be44e4e56c128961fb9b70c29da1f04a5f10c14aa1b9726f3b15f67
SchemaTypeCheckerTest.groovy https://github.com/graphql-java/graphql-java/pull/4444/files#diff-3a8881a5dde20f458dc2e12b5f21584948277d1745ab67d4585871405da60ca1
TypeDefinitionRegistryTest.groovy https://github.com/graphql-java/graphql-java/pull/4444/files#diff-03a8a4122fc2a5fba94e218baeeb1a5a91066aaff99fe46d1dcd78e10f1409d0
src/main/java/graphql/schema/idl/TypeDefinitionRegistry.javahttps://github.com/graphql-java/graphql-java/pull/4444/files#diff-f2b085da7be44e4e56c128961fb9b70c29da1f04a5f10c14aa1b9726f3b15f67
View file https://github.com/graphql-java/graphql-java/blob/8f7450621100e0ab43910519936e90106d3a39a9/src/main/java/graphql/schema/idl/TypeDefinitionRegistry.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/graphql-java/graphql-java/pull/4444/{{ revealButtonHref }}
https://github.com/graphql-java/graphql-java/pull/4444/files#diff-f2b085da7be44e4e56c128961fb9b70c29da1f04a5f10c14aa1b9726f3b15f67
https://github.com/graphql-java/graphql-java/pull/4444/files#diff-f2b085da7be44e4e56c128961fb9b70c29da1f04a5f10c14aa1b9726f3b15f67
https://github.com/graphql-java/graphql-java/pull/4444/files#diff-f2b085da7be44e4e56c128961fb9b70c29da1f04a5f10c14aa1b9726f3b15f67
https://github.com/graphql-java/graphql-java/pull/4444/files#diff-f2b085da7be44e4e56c128961fb9b70c29da1f04a5f10c14aa1b9726f3b15f67
https://github.com/graphql-java/graphql-java/pull/4444/files#diff-f2b085da7be44e4e56c128961fb9b70c29da1f04a5f10c14aa1b9726f3b15f67
https://github.com/graphql-java/graphql-java/pull/4444/files#diff-f2b085da7be44e4e56c128961fb9b70c29da1f04a5f10c14aa1b9726f3b15f67
src/test/groovy/graphql/schema/idl/SchemaTypeCheckerTest.groovyhttps://github.com/graphql-java/graphql-java/pull/4444/files#diff-3a8881a5dde20f458dc2e12b5f21584948277d1745ab67d4585871405da60ca1
View file https://github.com/graphql-java/graphql-java/blob/8f7450621100e0ab43910519936e90106d3a39a9/src/test/groovy/graphql/schema/idl/SchemaTypeCheckerTest.groovy
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/graphql-java/graphql-java/pull/4444/{{ revealButtonHref }}
https://github.com/graphql-java/graphql-java/pull/4444/files#diff-3a8881a5dde20f458dc2e12b5f21584948277d1745ab67d4585871405da60ca1
https://github.com/graphql-java/graphql-java/pull/4444/files#diff-3a8881a5dde20f458dc2e12b5f21584948277d1745ab67d4585871405da60ca1
src/test/groovy/graphql/schema/idl/TypeDefinitionRegistryTest.groovyhttps://github.com/graphql-java/graphql-java/pull/4444/files#diff-03a8a4122fc2a5fba94e218baeeb1a5a91066aaff99fe46d1dcd78e10f1409d0
View file https://github.com/graphql-java/graphql-java/blob/8f7450621100e0ab43910519936e90106d3a39a9/src/test/groovy/graphql/schema/idl/TypeDefinitionRegistryTest.groovy
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/graphql-java/graphql-java/pull/4444/{{ revealButtonHref }}
https://github.com/graphql-java/graphql-java/pull/4444/files#diff-03a8a4122fc2a5fba94e218baeeb1a5a91066aaff99fe46d1dcd78e10f1409d0
https://github.com/graphql-java/graphql-java/pull/4444/files#diff-03a8a4122fc2a5fba94e218baeeb1a5a91066aaff99fe46d1dcd78e10f1409d0
https://github.com/graphql-java/graphql-java/pull/4444/files#diff-03a8a4122fc2a5fba94e218baeeb1a5a91066aaff99fe46d1dcd78e10f1409d0
https://github.com/graphql-java/graphql-java/pull/4444/files#diff-03a8a4122fc2a5fba94e218baeeb1a5a91066aaff99fe46d1dcd78e10f1409d0
Please reload this pagehttps://github.com/graphql-java/graphql-java/pull/4444/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.