René's URL Explorer Experiment


Title: Limit input-value depth in variables and schema defaults by andimarek · Pull Request #4552 · graphql-java/graphql-java · GitHub

Open Graph Title: Limit input-value depth in variables and schema defaults by andimarek · Pull Request #4552 · graphql-java/graphql-java

X Title: Limit input-value depth in variables and schema defaults by andimarek · Pull Request #4552 · graphql-java/graphql-java

Description: Deeply nested external variables can overflow recursive coercion even for a small operation. This change adds InputValueLimits, with a default maximum depth of 128 input-object/list values per path. The policy applies at two boundaries: Supplied variable values are checked during coercion and normalized-variable conversion, using the request's GraphQLContext override or the JVM-wide limit. Exceeding the limit produces the existing variable-coercion request error, including the variable definition location. Schema defaults are checked during schema validation using the JVM-wide limit, consistently for SDL literals, programmatic values, and legacy internal defaults. Each default is checked independently before recursive schema validators inspect it. Request overrides and later global changes do not recheck validated defaults during execution, getters, printing, or introspection. Non-null wrappers do not count. Nulls and scalar payloads are not traversed. Singleton-list coercion counts as a list level, and siblings do not accumulate depth. Filling in an omitted schema default does not consume the supplied variable's depth budget. The early schema check reports the default's coordinate without printing the oversized value. Programmatic list defaults use collections or arrays; iterators, streams, and other iterables are rejected during schema validation without being consumed. Applications can configure InputValueLimits.newInputValueLimits().maxDepth(...), use InputValueLimits.NONE for trusted inputs, or change the JVM-wide limit with setDefaultLimits. Set the JVM-wide limit before building a schema to control default validation; per-request overrides govern supplied variables only. Breaking change: Values deeper than 128 are rejected by default, including schema defaults at build time. Programmatic list defaults must use collections or arrays. Custom scalar payloads remain the scalar implementation's responsibility. Internal coercion helpers no longer carry synthetic variable names. Variable names are attached to request errors at the variable boundary; internal OneOf assertions identify the input type. Tests exercise exact boundaries across argument, input-field and directive defaults; SDL parsing; strict request overrides; introspection and default getters; supplied-variable rejection; very deep and cyclic defaults; list coercion; scalar opacity; and rejecting one-shot inputs without consuming them. Validation: Full local Java 25 validation passed: ./gradlew test testng check javadoc jacocoTestReport. Spock: 6,292 passed, 7 skipped. TestNG: 141 passed, 49 skipped. No per-class coverage regressions across 995 classes against the unchanged baseline. 36 limit/default tests passed with -Xss256k; the final cyclic-default case also passed in the full suite. The diagnostic cleanup passed 247 existing tests locally (1 skipped) and build checks, without adding test cases. All 10 GitHub checks passed on ad9cce96f: Java 17/21/25 tests and TestNG, build checks, Javadoc, jcstress, file validation, and the per-class coverage gate. JMH results recorded for the initial variable-coercion commit 9afd53208 used two forks, three 5-second warmup iterations, and three 5-second measurement iterations per fork (µs/op, master → initial implementation): scalar 0.045 → 0.045; shallow object 0.078 → 0.075; 100-item list 0.776 → 0.794; 33-level object chain 11.257 → 11.462. The small differences were within the measured uncertainty. These measurements do not cover the added schema-validation pass; no new timing claim is made for the follow-up. HTTP adapters may enforce JSON nesting limits before values reach GraphQL Java; this change also protects direct ExecutionInput callers.

Open Graph Description: Deeply nested external variables can overflow recursive coercion even for a small operation. This change adds InputValueLimits, with a default maximum depth of 128 input-object/list values per path...

X Description: Deeply nested external variables can overflow recursive coercion even for a small operation. This change adds InputValueLimits, with a default maximum depth of 128 input-object/list values per path...

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

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:3a61575e-7fe8-25f3-3ec2-e5e9cb57f891
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB3E8:785A9:24DDC43:2EC1DF1:6B0188E0
html-safe-nonce356e2e66a6fa27418e79e88df8162eb4a7e1f14d3263553851b61d9069339cc5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCM0U4Ojc4NUE5OjI0RERDNDM6MkVDMURGMTo2QjAxODhFMCIsInZpc2l0b3JfaWQiOiIyODExMjEyNTc5ODY1NzI1MTUyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac15a478aad51b7af13acddcba8b390ef1fd840510b5723f20417af50ef3bfad24
hovercard-subject-tagpull_request:5268024408
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/4552/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:altDeeply nested external variables can overflow recursive coercion even for a small operation. This change adds InputValueLimits, with a default maximum depth of 128 input-object/list values per path...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
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
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/graphql-java/graphql-java/pull/4552/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgraphql-java%2Fgraphql-java%2Fpull%2F4552%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%2F4552%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/4552/files
Reloadhttps://github.com/graphql-java/graphql-java/pull/4552/files
Reloadhttps://github.com/graphql-java/graphql-java/pull/4552/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 requests35 (35)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/insights
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
masterhttps://github.com/graphql-java/graphql-java/tree/master
codex/limit-variable-coercion-depthhttps://github.com/graphql-java/graphql-java/tree/codex/limit-variable-coercion-depth
Conversation 1 https://github.com/graphql-java/graphql-java/pull/4552
Commits 3 https://github.com/graphql-java/graphql-java/pull/4552/commits
Checks 11 https://github.com/graphql-java/graphql-java/pull/4552/checks
Files changed https://github.com/graphql-java/graphql-java/pull/4552/files
Please reload this pagehttps://github.com/graphql-java/graphql-java/pull/4552/files
Limit input-value depth in variables and schema defaults https://github.com/graphql-java/graphql-java/pull/4552/files#top
Show all changes 3 commits https://github.com/graphql-java/graphql-java/pull/4552/files
9afd532 Limit nested external input values during coercion andimarek Nov 11, 2026 https://github.com/graphql-java/graphql-java/pull/4552/commits/9afd5320861c72e27efb5dc5ab6d049e53836928
67e4421 Validate schema default depth separately from request inputs andimarek Nov 11, 2026 https://github.com/graphql-java/graphql-java/pull/4552/commits/67e4421ab9402466a9c218f48888ee453654a143
ad9cce9 Remove synthetic variable names from input coercion andimarek Nov 12, 2026 https://github.com/graphql-java/graphql-java/pull/4552/commits/ad9cce96f35072503d28c9f51efdc9bc8683e4e1
Clear filters https://github.com/graphql-java/graphql-java/pull/4552/files
Please reload this pagehttps://github.com/graphql-java/graphql-java/pull/4552/files
Please reload this pagehttps://github.com/graphql-java/graphql-java/pull/4552/files
InputCoercionBenchmark.java https://github.com/graphql-java/graphql-java/pull/4552/files#diff-6e0d2a608d0f2988ae04a5176ec9ee6869f68c2e0291b5737407418521b0370e
InputValueLimits.java https://github.com/graphql-java/graphql-java/pull/4552/files#diff-53986ea1a7bfde8d0e4996629099409eeeb68ade5ef8b346869b75419965b874
ValuesResolver.java https://github.com/graphql-java/graphql-java/pull/4552/files#diff-5574cfd989be07c440b2e43f9eb0fac3c3490561ba036b1dea9ce7695101ba9e
ValuesResolverConversion.java https://github.com/graphql-java/graphql-java/pull/4552/files#diff-80b8748b24d21f6277a1e5019cd808621d276b1abb50bd87672d447f5c840ef0
ValuesResolverOneOfValidation.java https://github.com/graphql-java/graphql-java/pull/4552/files#diff-aa850fe4d226b7cf918bd7a0700052cfb62840a9a635f92163fc9f992cbea0c5
DefaultValueDepth.java https://github.com/graphql-java/graphql-java/pull/4552/files#diff-b6a0244c2073a49dcdf0dc874d8c6bfb33723d373b663cb08c326bdeda8cb3f5
SchemaValidator.java https://github.com/graphql-java/graphql-java/pull/4552/files#diff-c61128ed45b5042860e141f937a41901bfd98ce1561c282107e8f51c7d762035
FpKit.java https://github.com/graphql-java/graphql-java/pull/4552/files#diff-0e0a8a2e8e1631ba7b7092664122baeae05e628c5ce5b384508f7ba3e262e335
InputValueDefaultsTest.groovy https://github.com/graphql-java/graphql-java/pull/4552/files#diff-e90eb55fddf1f3fb983d649a39c7b5820477509523006294bc564caf29b46677
InputValueLimitsTest.groovy https://github.com/graphql-java/graphql-java/pull/4552/files#diff-1950d6e7e8c7e7f7e54d3b82cb5bca2f608b47788027a70ac8383b5d301c1f46
src/jmh/java/benchmark/InputCoercionBenchmark.javahttps://github.com/graphql-java/graphql-java/pull/4552/files#diff-6e0d2a608d0f2988ae04a5176ec9ee6869f68c2e0291b5737407418521b0370e
View file https://github.com/graphql-java/graphql-java/blob/ad9cce96f35072503d28c9f51efdc9bc8683e4e1/src/jmh/java/benchmark/InputCoercionBenchmark.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/graphql-java/graphql-java/pull/4552/{{ revealButtonHref }}
src/main/java/graphql/execution/InputValueLimits.javahttps://github.com/graphql-java/graphql-java/pull/4552/files#diff-53986ea1a7bfde8d0e4996629099409eeeb68ade5ef8b346869b75419965b874
View file https://github.com/graphql-java/graphql-java/blob/ad9cce96f35072503d28c9f51efdc9bc8683e4e1/src/main/java/graphql/execution/InputValueLimits.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/graphql-java/graphql-java/pull/4552/{{ revealButtonHref }}
src/main/java/graphql/execution/ValuesResolver.javahttps://github.com/graphql-java/graphql-java/pull/4552/files#diff-5574cfd989be07c440b2e43f9eb0fac3c3490561ba036b1dea9ce7695101ba9e
View file https://github.com/graphql-java/graphql-java/blob/ad9cce96f35072503d28c9f51efdc9bc8683e4e1/src/main/java/graphql/execution/ValuesResolver.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/graphql-java/graphql-java/pull/4552/{{ revealButtonHref }}
https://github.com/graphql-java/graphql-java/pull/4552/files#diff-5574cfd989be07c440b2e43f9eb0fac3c3490561ba036b1dea9ce7695101ba9e
https://github.com/graphql-java/graphql-java/pull/4552/files#diff-5574cfd989be07c440b2e43f9eb0fac3c3490561ba036b1dea9ce7695101ba9e
https://github.com/graphql-java/graphql-java/pull/4552/files#diff-5574cfd989be07c440b2e43f9eb0fac3c3490561ba036b1dea9ce7695101ba9e
https://github.com/graphql-java/graphql-java/pull/4552/files#diff-5574cfd989be07c440b2e43f9eb0fac3c3490561ba036b1dea9ce7695101ba9e
Please reload this pagehttps://github.com/graphql-java/graphql-java/pull/4552/files
Please reload this pagehttps://github.com/graphql-java/graphql-java/pull/4552/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.