Skip to content

[pull] master from dotansimha:master - #238

Merged
pull[bot] merged 2 commits into
jeffdetmer:masterfrom
dotansimha:master
Sep 28, 2026
Merged

pull[bot] merged 2 commits into
jeffdetmer:masterfrom
dotansimha:master

Conversation

@pull

@pull pull Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

eddeee888 and others added 2 commits September 28, 2026 23:23
…s as written to stop OOM with nested fragments (#10940) (#10982)

* test: reproduce #10940 — type cache keys grow exponentially with nested fragment reuse

Synthetic repro: fragments F0..F7 where each spreads the previous one under
three fields. With `inlineFragmentTypes: 'combine'` the generated output is
~2.3 KB, but the `typeCache` keys built from the fragment-expanded field paths
(`getFieldNames`) reach 180 KB for a single key and 483 KB in total, growing
~3.3x per extra nesting level. On large projects this runs out of memory.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013DCrEAx4J6ze2GV4FinZs5

eddeee888:oss:issue-verify

* test: reduce #10940 repro to the minimal config

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013DCrEAx4J6ze2GV4FinZs5

* fix: build type cache keys from selection sets as written, not fragment-expanded paths (#10940)

The per-selection-set type cache was keyed by every fragment-expanded field path
(`getFieldNames`), so keys grew exponentially with nested fragment reuse and
exhausted memory on large projects. Keys now describe the selection set as
written (fragment spreads by name, plus directives and inline fragments), built
by `getSelectionSetCacheKey` and memoized per node in `selectionSetCacheKeys`
(both @internal). `getFieldNames` is removed. The repro test now spies on
`selectionSetCacheKeys` instead of `Map.prototype.set`.

Co-authored-by: Eddy Nguyen <ch@eddeee888.me>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013DCrEAx4J6ze2GV4FinZs5

eddeee888:oss:issue-fix

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@pull pull Bot locked and limited conversation to collaborators Sep 28, 2026
@pull pull Bot added the ⤵️ pull label Sep 28, 2026
@pull
pull Bot merged commit 4e8654d into jeffdetmer:master Sep 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant