René's URL Explorer Experiment


Title: Backport 26.1: Fix schema rebuild after root type deletion by andimarek · Pull Request #4446 · graphql-java/graphql-java · GitHub

Open Graph Title: Backport 26.1: Fix schema rebuild after root type deletion by andimarek · Pull Request #4446 · graphql-java/graphql-java

X Title: Backport 26.1: Fix schema rebuild after root type deletion by andimarek · Pull Request #4446 · graphql-java/graphql-java

Description: Backport of #4390 to the 26.x maintenance branch. Summary Fixes #3384. The core issue is that a built GraphQLSchema can contain two views of the same relationship: the original child list used for rebuild traversal, which may still contain GraphQLTypeReference("Node") the resolved accessor view used by runtime/schema APIs, where Person.getInterfaces() returns the actual GraphQLInterfaceType Node instance In the #3384 repro, Person was originally created with .withInterface(typeRef("Node")). During schema build, that reference is resolved and Person.getInterfaces() starts returning the real Node interface. Later, when the mutation root is removed, Node is no longer reachable through the deleted mutation field. The rebuilt schema still reaches Person from Query, and Person still implements Node, so Node must remain in the rebuilt type map. The catch is that schema build collection intentionally traverses getChildrenWithTypeReferences(). For Person, that traversal sees the original GraphQLTypeReference("Node"), not the already-resolved Node object returned by Person.getInterfaces(). So the collector can visit Person without collecting the resolved Node interface. Later, GraphQLTypeResolvingVisitor uses Person.getInterfaces(), looks up Node in the rebuilt type map, and fails because Node was missed during collection. This is what the code calls an indirect strong reference: indirect: the traverser did not visit it as a normal child node, because the child list exposes the original type reference strong: the schema element already holds the actual GraphQLNamedType object through an accessor such as getInterfaces() or getTypes() GraphQLTypeCollectingVisitor already handled this pattern for field, argument, input field, and applied directive argument types. This PR extends the same collection logic to: object implemented interfaces interface implemented interfaces union member types The same original-reference versus resolved-accessor split exists for unions and interface inheritance: GraphQLUnionType.getChildrenWithTypeReferences() exposes original possible types, while getTypes() can return resolved object types GraphQLInterfaceType.getChildrenWithTypeReferences() exposes original implemented interfaces, while getInterfaces() can return resolved interfaces This does not keep every deleted-path extra type alive. It only preserves resolved named types that are still referenced by a schema element that remains reachable in the rebuilt schema. Repro Coverage Adds #3384 Spock coverage for these schema rebuild cases: object implementing an interface through a type reference union containing a member through a type reference interface implementing another interface through a type reference The object/interface case is covered through both paths: direct rebuild with GraphQLSchema.newSchema(schema).mutation((GraphQLObjectType) null).build() traversal-based deletion with SchemaTransformer.transformSchemaWithDeletes(...) The union and interface-inheritance cases specifically prove why GraphQLTypeCollectingVisitor needs to follow getTypes() and getInterfaces(), not just field/argument/input references. Before the collector change, these cases fail during rebuild with an NPE in GraphQLTypeResolvingVisitor; they now pass. Local Test Stability This PR also keeps the local build cleanup from the previous version of #4390: markGeneratedEqualsHashCode now cleans classes-jacoco before rewriting and does not append duplicate graphql.coverage.Generated annotations. That prevents local-only ArchUnit failures in JMHForkArchRuleTest after interrupted or repeated incremental runs. Verification ./gradlew test --tests "graphql.schema.impl.SchemaUtilTest.can rebuild schema after removing root type that made an implemented interface reachable" --tests "graphql.schema.impl.SchemaUtilTest.can transform schema after deleting root type that made an implemented interface reachable" --tests "graphql.schema.impl.SchemaUtilTest.can rebuild schema after removing root type that made a union member reachable" --tests "graphql.schema.impl.SchemaUtilTest.can rebuild schema after removing root type that made an interface implemented by another interface reachable" ./gradlew test --tests graphql.schema.impl.SchemaUtilTest Also ran: git diff --check

Open Graph Description: Backport of #4390 to the 26.x maintenance branch. Summary Fixes #3384. The core issue is that a built GraphQLSchema can contain two views of the same relationship: the original child list used for...

X Description: Backport of #4390 to the 26.x maintenance branch. Summary Fixes #3384. The core issue is that a built GraphQLSchema can contain two views of the same relationship: the original child list used for...

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

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:97579d3d-79d4-5e44-c546-c6566cb292bd
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCAFA:20C6D9:D4E5AD:11B7414:6AED4394
html-safe-nonced29fbf784dfb65a7b8640a68c0425c3636fd9f00548b56f1d5abd0393c96da39
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQUZBOjIwQzZEOTpENEU1QUQ6MTFCNzQxNDo2QUVENDM5NCIsInZpc2l0b3JfaWQiOiI4NDgxNjk4Nzg5NDE0NzQ5MDc2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac3dac9890f6cd25afd684947f67f23b11b015d09e240f9f9ac2af7f86d36d802e
hovercard-subject-tagpull_request:4318552808
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/4446/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 #4390 to the 26.x maintenance branch. Summary Fixes #3384. The core issue is that a built GraphQLSchema can contain two views of the same relationship: the original child list used for...
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/4446/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgraphql-java%2Fgraphql-java%2Fpull%2F4446%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%2F4446%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/4446/files
Reloadhttps://github.com/graphql-java/graphql-java/pull/4446/files
Reloadhttps://github.com/graphql-java/graphql-java/pull/4446/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-4390-to-26.xhttps://github.com/graphql-java/graphql-java/tree/codex/backport-4390-to-26.x
Conversation 1 https://github.com/graphql-java/graphql-java/pull/4446
Commits 2 https://github.com/graphql-java/graphql-java/pull/4446/commits
Checks 10 https://github.com/graphql-java/graphql-java/pull/4446/checks
Files changed https://github.com/graphql-java/graphql-java/pull/4446/files
Please reload this pagehttps://github.com/graphql-java/graphql-java/pull/4446/files
Backport 26.1: Fix schema rebuild after root type deletion https://github.com/graphql-java/graphql-java/pull/4446/files#top
Show all changes 2 commits https://github.com/graphql-java/graphql-java/pull/4446/files
1060a22 Fix schema rebuild after root type deletion (#4390) andimarek May 20, 2026 https://github.com/graphql-java/graphql-java/pull/4446/commits/1060a222e753dddb323b5454914cc045cf2b2b77
8d6eaba Merge remote-tracking branch 'origin/26.x' into codex/backport-4390-t… andimarek Aug 22, 2026 https://github.com/graphql-java/graphql-java/pull/4446/commits/8d6eaba815bc7df885adaa04549afe5eba055470
Clear filters https://github.com/graphql-java/graphql-java/pull/4446/files
Please reload this pagehttps://github.com/graphql-java/graphql-java/pull/4446/files
Please reload this pagehttps://github.com/graphql-java/graphql-java/pull/4446/files
build.gradle https://github.com/graphql-java/graphql-java/pull/4446/files#diff-49a96e7eea8a94af862798a45174e6ac43eb4f8b4bd40759b5da63ba31ec3ef7
GraphQLTypeCollectingVisitor.java https://github.com/graphql-java/graphql-java/pull/4446/files#diff-5c64371827e07b4617dec9aae16ed5b616af9404d197ff6ec37d81e2c5155116
SchemaUtilTest.groovy https://github.com/graphql-java/graphql-java/pull/4446/files#diff-2b27891095c0293875870cab030824245b47e2769c6630773bbc69e265cd6f39
build.gradlehttps://github.com/graphql-java/graphql-java/pull/4446/files#diff-49a96e7eea8a94af862798a45174e6ac43eb4f8b4bd40759b5da63ba31ec3ef7
View file https://github.com/graphql-java/graphql-java/blob/8d6eaba815bc7df885adaa04549afe5eba055470/build.gradle
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/graphql-java/graphql-java/pull/4446/{{ revealButtonHref }}
https://github.com/graphql-java/graphql-java/pull/4446/files#diff-49a96e7eea8a94af862798a45174e6ac43eb4f8b4bd40759b5da63ba31ec3ef7
https://github.com/graphql-java/graphql-java/pull/4446/files#diff-49a96e7eea8a94af862798a45174e6ac43eb4f8b4bd40759b5da63ba31ec3ef7
src/main/java/graphql/schema/impl/GraphQLTypeCollectingVisitor.javahttps://github.com/graphql-java/graphql-java/pull/4446/files#diff-5c64371827e07b4617dec9aae16ed5b616af9404d197ff6ec37d81e2c5155116
View file https://github.com/graphql-java/graphql-java/blob/8d6eaba815bc7df885adaa04549afe5eba055470/src/main/java/graphql/schema/impl/GraphQLTypeCollectingVisitor.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/graphql-java/graphql-java/pull/4446/{{ revealButtonHref }}
https://github.com/graphql-java/graphql-java/pull/4446/files#diff-5c64371827e07b4617dec9aae16ed5b616af9404d197ff6ec37d81e2c5155116
https://github.com/graphql-java/graphql-java/pull/4446/files#diff-5c64371827e07b4617dec9aae16ed5b616af9404d197ff6ec37d81e2c5155116
https://github.com/graphql-java/graphql-java/pull/4446/files#diff-5c64371827e07b4617dec9aae16ed5b616af9404d197ff6ec37d81e2c5155116
https://github.com/graphql-java/graphql-java/pull/4446/files#diff-5c64371827e07b4617dec9aae16ed5b616af9404d197ff6ec37d81e2c5155116
https://github.com/graphql-java/graphql-java/pull/4446/files#diff-5c64371827e07b4617dec9aae16ed5b616af9404d197ff6ec37d81e2c5155116
https://github.com/graphql-java/graphql-java/pull/4446/files#diff-5c64371827e07b4617dec9aae16ed5b616af9404d197ff6ec37d81e2c5155116
src/test/groovy/graphql/schema/impl/SchemaUtilTest.groovyhttps://github.com/graphql-java/graphql-java/pull/4446/files#diff-2b27891095c0293875870cab030824245b47e2769c6630773bbc69e265cd6f39
View file https://github.com/graphql-java/graphql-java/blob/8d6eaba815bc7df885adaa04549afe5eba055470/src/test/groovy/graphql/schema/impl/SchemaUtilTest.groovy
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/graphql-java/graphql-java/pull/4446/{{ revealButtonHref }}
https://github.com/graphql-java/graphql-java/pull/4446/files#diff-2b27891095c0293875870cab030824245b47e2769c6630773bbc69e265cd6f39
https://github.com/graphql-java/graphql-java/pull/4446/files#diff-2b27891095c0293875870cab030824245b47e2769c6630773bbc69e265cd6f39
https://github.com/graphql-java/graphql-java/pull/4446/files#diff-2b27891095c0293875870cab030824245b47e2769c6630773bbc69e265cd6f39
https://github.com/graphql-java/graphql-java/pull/4446/files#diff-2b27891095c0293875870cab030824245b47e2769c6630773bbc69e265cd6f39
https://github.com/graphql-java/graphql-java/pull/4446/files#diff-2b27891095c0293875870cab030824245b47e2769c6630773bbc69e265cd6f39
https://github.com/graphql-java/graphql-java/pull/4446/files#diff-2b27891095c0293875870cab030824245b47e2769c6630773bbc69e265cd6f39
Please reload this pagehttps://github.com/graphql-java/graphql-java/pull/4446/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.