René's URL Explorer Experiment


Title: Improper handling of cyclical directive defs (spec issue) · Issue #4201 · graphql-java/graphql-java · GitHub

Open Graph Title: Improper handling of cyclical directive defs (spec issue) · Issue #4201 · graphql-java/graphql-java

X Title: Improper handling of cyclical directive defs (spec issue) · Issue #4201 · graphql-java/graphql-java

Description: Describe the bug The spec prohibits the definitions of directives to reference each other directly or indirectly via applied directives. GraphQL Java (25) correctly detects the direct case, but overflows the stack during validation for t...

Open Graph Description: Describe the bug The spec prohibits the definitions of directives to reference each other directly or indirectly via applied directives. GraphQL Java (25) correctly detects the direct case, but ove...

X Description: Describe the bug The spec prohibits the definitions of directives to reference each other directly or indirectly via applied directives. GraphQL Java (25) correctly detects the direct case, but ove...

Opengraph URL: https://github.com/graphql-java/graphql-java/issues/4201

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Improper handling of cyclical directive defs (spec issue)","articleBody":"**Describe the bug**\n\nThe spec prohibits the definitions of directives to reference each other directly or indirectly via applied directives.  GraphQL Java (25) correctly detects the direct case, but overflows the stack during validation for the indirect case.\n\n[Diagnostics link](https://chatgpt.com/s/dr_6959bbdfea208191b610320a44cd9e84)\n\n**To Reproduce**\n```\nimport graphql.schema.idl.SchemaParser;\nimport graphql.schema.idl.TypeDefinitionRegistry;\nimport graphql.schema.idl.UnExecutableSchemaGenerator;\nimport org.junit.jupiter.api.Test;\n\nimport static org.junit.jupiter.api.Assertions.assertThrows;\n\n/**\n * Reproduction test for graphql-java circular directive dependency bug.\n *\n * When directives mutually reference each other via applied directives on their\n * arguments, UnExecutableSchemaGenerator.makeUnExecutableSchema() throws\n * StackOverflowError instead of detecting the cycle and reporting a proper error.\n *\n * NOTE: graphql-java correctly detects direct self-reference (A -> A) and throws\n * SchemaProblem, but fails to detect indirect cycles (A -> B -> A) or longer\n * cycles (A -> B -> C -> A), resulting in StackOverflowError.\n *\n * Dependencies: graphql-java, JUnit 5\n */\npublic class CircularDirectiveStackOverflowTest {\n\n    @Test\n    void selfReferencingDirectiveCorrectlyThrowsSchemaProblem() {\n        // A directive that references itself via applied directive on its argument\n        // graphql-java correctly detects this direct self-reference\n        String sdl = \"\"\"\n            directive @recursive(depth: Int @recursive(depth: 0)) on FIELD_DEFINITION | ARGUMENT_DEFINITION\n\n            type Query { field: String @recursive(depth: 5) }\n            \"\"\";\n\n        TypeDefinitionRegistry registry = new SchemaParser().parse(sdl);\n\n        // This correctly throws SchemaProblem (not a bug)\n        assertThrows(graphql.schema.idl.errors.SchemaProblem.class, () -> {\n            UnExecutableSchemaGenerator.makeUnExecutableSchema(registry);\n        });\n    }\n\n    @Test\n    void mutualDirectiveReferenceCausesStackOverflowError() {\n        // Two directives that reference each other via applied directives on arguments\n        // This is an indirect cycle: @foo -> @bar -> @foo\n        String sdl = \"\"\"\n            directive @foo(x: Int @bar(y: 1)) on FIELD_DEFINITION | ARGUMENT_DEFINITION\n            directive @bar(y: Int @foo(x: 2)) on FIELD_DEFINITION | ARGUMENT_DEFINITION\n\n            type Query { field: String @foo(x: 10) @bar(y: 20) }\n            \"\"\";\n\n        TypeDefinitionRegistry registry = new SchemaParser().parse(sdl);\n\n        // BUG: This throws StackOverflowError instead of a proper validation error\n        assertThrows(StackOverflowError.class, () -> {\n            UnExecutableSchemaGenerator.makeUnExecutableSchema(registry);\n        });\n    }\n\n    @Test\n    void threeWayCircularDirectiveReferenceCausesStackOverflowError() {\n        // Three directives forming a cycle: @dirA -> @dirB -> @dirC -> @dirA\n        String sdl = \"\"\"\n            directive @dirA(x: Int @dirB(y: 1)) on FIELD_DEFINITION | ARGUMENT_DEFINITION\n            directive @dirB(y: Int @dirC(z: 2)) on FIELD_DEFINITION | ARGUMENT_DEFINITION\n            directive @dirC(z: Int @dirA(x: 3)) on FIELD_DEFINITION | ARGUMENT_DEFINITION\n\n            type Query { field: String @dirA(x: 10) @dirB(y: 20) @dirC(z: 30) }\n            \"\"\";\n\n        TypeDefinitionRegistry registry = new SchemaParser().parse(sdl);\n\n        // BUG: This throws StackOverflowError instead of a proper validation error\n        assertThrows(StackOverflowError.class, () -> {\n            UnExecutableSchemaGenerator.makeUnExecutableSchema(registry);\n        });\n    }\n}\n```\n","author":{"url":"https://github.com/rstata","@type":"Person","name":"rstata"},"datePublished":"2026-01-04T01:03:09Z","url":"https://github.com/graphql-java/graphql-java/issues/4201"}

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/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:50f7d8ac-4e17-b84e-dba6-1c2d933f8b51
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idEDF0:182799:1A06D0A:22DE835:6AED8694
html-safe-nonce4e494be37eeae9e5efccd634d83232044dd961abe4b5a740ac39f58e5b6abd56
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFREYwOjE4Mjc5OToxQTA2RDBBOjIyREU4MzU6NkFFRDg2OTQiLCJ2aXNpdG9yX2lkIjoiNzQ4NzAxMDY3ODkyNTc4ODgyMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac9c26bbfa96f406ba9a888fcbfe22fbd283af6f843ca36c9722cb7ec0cff634bb
hovercard-subject-tagissue:3778645604
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/graphql-java/graphql-java/4201/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ddbf1451711bd41bc2786755deb2616e76907f920272af3543ffcf7db9bd94f9/graphql-java/graphql-java/issues/4201
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ddbf1451711bd41bc2786755deb2616e76907f920272af3543ffcf7db9bd94f9/graphql-java/graphql-java/issues/4201
og:image:altDescribe the bug The spec prohibits the definitions of directives to reference each other directly or indirectly via applied directives. GraphQL Java (25) correctly detects the direct case, but ove...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamerstata
hostnamegithub.com
expected-hostnamegithub.com
None56fb42677ae87ed3e64410323d67980aa65d0485568a7858f874e7edfc6d1c11
turbo-cache-controlno-preview
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
disable-turbofalse
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
react-app-nameissues

Links:

Skip to contenthttps://github.com/graphql-java/graphql-java/issues/4201#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgraphql-java%2Fgraphql-java%2Fissues%2F4201
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%2Fissues%2F4201
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=graphql-java%2Fgraphql-java
Reloadhttps://github.com/graphql-java/graphql-java/issues/4201
Reloadhttps://github.com/graphql-java/graphql-java/issues/4201
Reloadhttps://github.com/graphql-java/graphql-java/issues/4201
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
https://github.com/graphql-java/graphql-java
New issuehttps://github.com/login?return_to=https://github.com/graphql-java/graphql-java/issues/4201
New issuehttps://github.com/login?return_to=https://github.com/graphql-java/graphql-java/issues/4201
#4385https://github.com/graphql-java/graphql-java/pull/4385
#4202https://github.com/graphql-java/graphql-java/pull/4202
Improper handling of cyclical directive defs (spec issue)https://github.com/graphql-java/graphql-java/issues/4201#top
#4385https://github.com/graphql-java/graphql-java/pull/4385
#4202https://github.com/graphql-java/graphql-java/pull/4202
https://github.com/andimarek
https://github.com/copilot-swe-agent
https://github.com/rstata
rstatahttps://github.com/rstata
on Jan 4, 2026https://github.com/graphql-java/graphql-java/issues/4201#issue-3778645604
Diagnostics linkhttps://chatgpt.com/s/dr_6959bbdfea208191b610320a44cd9e84
andimarekhttps://github.com/andimarek
andimarekhttps://github.com/andimarek
Copilothttps://github.com/apps/copilot-swe-agent
on Jan 7, 2026https://github.com/graphql-java/graphql-java/issues/4201#event-21891196990
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Mar 9, 2026https://github.com/graphql-java/graphql-java/issues/4201#issuecomment-4020384037
GitHub Actionshttps://help.github.com/en/actions
github-actionshttps://github.com/apps/github-actions
Stalehttps://github.com/graphql-java/graphql-java/issues?q=state%3Aopen%20label%3A%22Stale%22
on Mar 9, 2026https://github.com/graphql-java/graphql-java/issues/4201#event-23379199713
dondonzhttps://github.com/dondonz
on Mar 14, 2026https://github.com/graphql-java/graphql-java/issues/4201#event-23567269062
Fix 5 open issues: subscription memory leak, cyclical directives, dup…https://github.com/graphql-java/graphql-java/commit/2bfc07b2c1e9b49004c134a583573e65f55e4c9d
2bfc07bhttps://github.com/graphql-java/graphql-java/commit/2bfc07b2c1e9b49004c134a583573e65f55e4c9d
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Apr 8, 2026https://github.com/graphql-java/graphql-java/issues/4201#issuecomment-4203042533
GitHub Actionshttps://help.github.com/en/actions
github-actionshttps://github.com/apps/github-actions
not plannedhttps://github.com/graphql-java/graphql-java/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Anot-planned
on Apr 8, 2026https://github.com/graphql-java/graphql-java/issues/4201#event-24278037240
dondonzhttps://github.com/dondonz
on Apr 8, 2026https://github.com/graphql-java/graphql-java/issues/4201#event-24311458979
github-actionshttps://github.com/apps/github-actions
Stalehttps://github.com/graphql-java/graphql-java/issues?q=state%3Aopen%20label%3A%22Stale%22
on Apr 9, 2026https://github.com/graphql-java/graphql-java/issues/4201#event-24317062311
https://github.com/andimarek
andimarekhttps://github.com/andimarek
on May 19, 2026https://github.com/graphql-java/graphql-java/issues/4201#issuecomment-4483275560
#4385https://github.com/graphql-java/graphql-java/pull/4385
andimarekhttps://github.com/andimarek
completedhttps://github.com/graphql-java/graphql-java/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#4385https://github.com/graphql-java/graphql-java/pull/4385
on May 19, 2026https://github.com/graphql-java/graphql-java/issues/4201#event-25699862287
Sign up for freehttps://github.com/signup?return_to=https://github.com/graphql-java/graphql-java/issues/4201
Sign in to commenthttps://github.com/login?return_to=https://github.com/graphql-java/graphql-java/issues/4201
andimarekhttps://github.com/andimarek
Copilothttps://github.com/apps/copilot-swe-agent
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.