René's URL Explorer Experiment


Title: QueryTraverser only descends into FragmentSpreads once · Issue #1695 · graphql-java/graphql-java · GitHub

Open Graph Title: QueryTraverser only descends into FragmentSpreads once · Issue #1695 · graphql-java/graphql-java

X Title: QueryTraverser only descends into FragmentSpreads once · Issue #1695 · graphql-java/graphql-java

Description: When the same fragment is used multiple times, QueryTraverser descends into its field only once. A simple example: { users { ...userInfo friends { ...userInfo } } fragment userInfo on User { name } } On a query such as this, QueryTravers...

Open Graph Description: When the same fragment is used multiple times, QueryTraverser descends into its field only once. A simple example: { users { ...userInfo friends { ...userInfo } } fragment userInfo on User { name }...

X Description: When the same fragment is used multiple times, QueryTraverser descends into its field only once. A simple example: { users { ...userInfo friends { ...userInfo } } fragment userInfo on User { name }...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"QueryTraverser only descends into FragmentSpreads once","articleBody":"When the same fragment is used multiple times, `QueryTraverser` descends into its field only once.\r\n\r\nA simple example:\r\n\r\n```graphql\r\n{\r\n  users {\r\n    ...userInfo\r\n    friends {\r\n      ...userInfo\r\n    }\r\n  }\r\n\r\n  fragment userInfo on User {\r\n    name\r\n  }\r\n}\r\n```\r\n\r\nOn a query such as this, `QueryTraverser` will visit the `name` field only once (and will visit the `...userInfo` spread twice, as expected). This is distinctly different from the behavior one would get for a semantically equivalent query with no fragments:\r\n\r\n```graphql\r\n{\r\n  users {\r\n    name\r\n    friends {\r\n      name\r\n    }\r\n  }\r\n}\r\n```\r\nOne immediate implication is on query complexity analysis. A (malicious?) query with recursive fragment spreads will get a score underestimated by orders of magnitude.\r\n\r\nAs an example, `MaxQueryComplexityInstrumentation` will calculate the complexity of the full introspection query to be 45, while in reality over a 100 fields are requested. And that query isn't intentionally crafted to trick the calculation with large, recursive, fragment spreads.\r\n\r\n### Investigation\r\n\r\nThe reason why this happens is that `QueryTraverser` [in this line](https://github.com/graphql-java/graphql-java/blob/master/src/main/java/graphql/analysis/QueryTraverser.java#L158) considers `FragmentDefinition` the only child of each `FragmentSpread`. Since both spreads have the same definitions, when the traverser encounters the 2nd spread, it will falsely believe ([in this line](https://github.com/graphql-java/graphql-java/blob/master/src/main/java/graphql/util/DefaultTraverserContext.java#L149)) its children (the definition) have already been visited and will not descend.\r\n\r\nHappy to help fixing this, but I'd need guidance on the approach...","author":{"url":"https://github.com/kaqqao","@type":"Person","name":"kaqqao"},"datePublished":"2019-11-11T00:54:57Z","url":"https://github.com/graphql-java/graphql-java/issues/1695"}

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/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:cd6b4639-6a36-716a-ef6b-2308402687ba
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC3C6:184D0E:34553:45A6E:6B017C53
html-safe-noncedb7a83669cdc81616075ac2ba045ce8d12e09c650f18beec34f8644a12641a05
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDM0M2OjE4NEQwRTozNDU1Mzo0NUE2RTo2QjAxN0M1MyIsInZpc2l0b3JfaWQiOiIyOTc1ODY2MjU4NjAxMzc2ODUxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac5f7f1413a99ab5503fed97629c9dea0e241364bb03a2525b20c3fc53e0743eeb
hovercard-subject-tagissue:520687334
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/1695/issue_layout
twitter:imagehttps://opengraph.githubassets.com/9012084c3d9f7a573e983408db227ce539a5d517d0d6557994370d9151c62121/graphql-java/graphql-java/issues/1695
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9012084c3d9f7a573e983408db227ce539a5d517d0d6557994370d9151c62121/graphql-java/graphql-java/issues/1695
og:image:altWhen the same fragment is used multiple times, QueryTraverser descends into its field only once. A simple example: { users { ...userInfo friends { ...userInfo } } fragment userInfo on User { name }...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamekaqqao
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
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
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/graphql-java/graphql-java/issues/1695#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgraphql-java%2Fgraphql-java%2Fissues%2F1695
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%2F1695
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/1695
Reloadhttps://github.com/graphql-java/graphql-java/issues/1695
Reloadhttps://github.com/graphql-java/graphql-java/issues/1695
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
https://github.com/graphql-java/graphql-java
New issuehttps://github.com/login?return_to=https://github.com/graphql-java/graphql-java/issues/1695
New issuehttps://github.com/login?return_to=https://github.com/graphql-java/graphql-java/issues/1695
QueryTraverser only descends into FragmentSpreads oncehttps://github.com/graphql-java/graphql-java/issues/1695#top
https://github.com/kaqqao
kaqqaohttps://github.com/kaqqao
on Nov 11, 2019https://github.com/graphql-java/graphql-java/issues/1695#issue-520687334
in this linehttps://github.com/graphql-java/graphql-java/blob/master/src/main/java/graphql/analysis/QueryTraverser.java#L158
in this linehttps://github.com/graphql-java/graphql-java/blob/master/src/main/java/graphql/util/DefaultTraverserContext.java#L149
kaqqaohttps://github.com/kaqqao
on Nov 11, 2019https://github.com/graphql-java/graphql-java/issues/1695#event-2788780475
QueryTraverser only descends into FragmentSpreads oncehttps://github.com/kaqqao/graphql-java/commit/8b94d585cd956b7d4aa5f1c144b28a5b884d423a
8b94d58https://github.com/kaqqao/graphql-java/commit/8b94d585cd956b7d4aa5f1c144b28a5b884d423a
https://github.com/andimarek
andimarekhttps://github.com/andimarek
on Jan 9, 2020https://github.com/graphql-java/graphql-java/issues/1695#issuecomment-572376870
@kaqqaohttps://github.com/kaqqao
https://github.com/andimarek
andimarekhttps://github.com/andimarek
on Jan 9, 2020https://github.com/graphql-java/graphql-java/issues/1695#issuecomment-572778327
@kaqqaohttps://github.com/kaqqao
https://github.com/kaqqao
kaqqaohttps://github.com/kaqqao
on Jan 10, 2020https://github.com/graphql-java/graphql-java/issues/1695#issuecomment-572835460
https://github.com/andimarek
andimarekhttps://github.com/andimarek
on Jan 10, 2020https://github.com/graphql-java/graphql-java/issues/1695#issuecomment-572889465
@kaqqaohttps://github.com/kaqqao
https://github.com/graphql-java/graphql-java/pull/1731/files#diff-72f87f8a5876e2927c1df5eb8cb4bd38R479https://github.com/graphql-java/graphql-java/pull/1731/files#diff-72f87f8a5876e2927c1df5eb8cb4bd38R479
https://github.com/kaqqao
kaqqaohttps://github.com/kaqqao
on Feb 8, 2021https://github.com/graphql-java/graphql-java/issues/1695#issuecomment-774800426
https://github.com/bbakerman
bbakermanhttps://github.com/bbakerman
on Feb 8, 2021https://github.com/graphql-java/graphql-java/issues/1695#issuecomment-775012610
https://github.com/jstlnd
jstlndhttps://github.com/jstlnd
on Apr 22, 2021https://github.com/graphql-java/graphql-java/issues/1695#issuecomment-824908062
https://github.com/kaqqao
kaqqaohttps://github.com/kaqqao
on Apr 8, 2023https://github.com/graphql-java/graphql-java/issues/1695#issuecomment-1500756599
kaqqaohttps://github.com/kaqqao
on Apr 10, 2023https://github.com/graphql-java/graphql-java/issues/1695#event-8959946000
Enable selection set analysis before field resolution startshttps://github.com/kaqqao/graphql-java/commit/792aaceeed093b671631a8473ef916f571f4d9f6
https://docs.github.com/articles/closing-issues-via-commit-messages
792aacehttps://github.com/kaqqao/graphql-java/commit/792aaceeed093b671631a8473ef916f571f4d9f6
https://github.com/bbakerman
bbakermanhttps://github.com/bbakerman
on Apr 11, 2023https://github.com/graphql-java/graphql-java/issues/1695#issuecomment-1502882189
https://github.com/kaqqao
kaqqaohttps://github.com/kaqqao
on Apr 11, 2023https://github.com/graphql-java/graphql-java/issues/1695#issuecomment-1502890142
kaqqaohttps://github.com/kaqqao
completedhttps://github.com/graphql-java/graphql-java/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Apr 11, 2023https://github.com/graphql-java/graphql-java/issues/1695#event-8970665640
Sign up for freehttps://github.com/signup?return_to=https://github.com/graphql-java/graphql-java/issues/1695
Sign in to commenthttps://github.com/login?return_to=https://github.com/graphql-java/graphql-java/issues/1695
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.