Skip to content

Backport OverlappingFieldsCanMerge changes (v16) - #4900

Merged
yaacovCR merged 27 commits into
graphql:16.x.xfrom
yaacovCR:v16-overlap
Oct 21, 2026
Merged

yaacovCR merged 27 commits into
graphql:16.x.xfrom
yaacovCR:v16-overlap

Conversation

@yaacovCR

Copy link
Copy Markdown
Contributor

No description provided.

Motivation: Represent distinct fragment names directly before changing field collection storage.

Backport of the rule-local changes from bf6fd5b (graphql#3688).
Motivation: Use Map lookups for response-name groups before adding collection-owned caches.

Backport of the rule-local collection changes from dcf24a0 (graphql#3872).
Motivation: Distinguish the validation context from the rule-local cache context.
Motivation: Keep comparison histories and collected-field caches together for one validation.

Backport of 87aaa4d (graphql#4855), without fragment-argument state.
Motivation: Document parent-conflict short circuits and reversed fragment traversal before changing comparison caches.

Backports the applicable cases from graphql#4843 and the current v17 nested-fragment test, retaining the release test harness.
Motivation: Skip comparisons when either field collection is empty.

Backport of ee5ce41 (graphql#4857).
Motivation: Name field records by the information they hold.

Backport of a1cc77b (graphql#4871).
Motivation: Name each response-name group before changing its representation.

Backport of 67c1ef7 (graphql#4872).
Motivation: Match the grouped-field terminology used by execution.

Backport of 4c6253e (graphql#4873).
Motivation: Use collectFields and CollectFieldsResult to match execution terminology; consider revisiting both collectors together in a follow-up.

Backport of 39d2c2d (graphql#4874).
Motivation: Give each field detail an explicit property name.

Backport of 22fad8e (graphql#4875).
Motivation: Name the grouped fields and referenced fragments in each collection result.

Backport of f36f3fe (graphql#4876).
Motivation: Make conflict reasons and locations explicit before bounding reporting.

Backport of 44ca750 (graphql#4877).
…rder

Motivation: Reuse comparison history without ordering the pair keys.

Backport of bc96e32 (graphql#4878), adapted without fragment arguments.
Motivation: Shared selection-set ASTs can have different field definitions under different parent types.

Backport of d5d4c96 (graphql#4879), without fragment-argument scope keys.
Motivation: Keep derived comparison data with the collection that owns it.

Backport of 3745f82 (graphql#4881), adapted without fragment arguments.
Store compared fragment names and their type-exclusivity flags on the collected field set. Keep the fragment-pair cache as a single class.

Motivation: Avoid an extra collection index when fragment arguments are absent.
Motivation: Prepare argument lookups once per overlapping field record.

Backport of 5756cf3 (graphql#4883), adapted without fragment arguments.
Motivation: Compare argument values without formatting them for display.

Backport of 278eb44 (graphql#4886), adapted without fragment arguments.
Cache the field-name and argument conflict reason per field pair. Check return types and subfields separately.

Motivation: Without fragment arguments, a pair's name and argument comparison has one reusable result.

Backport of 3200265 (graphql#4889), adapted without fragment arguments.
Motivation: Prepare each argument value only once per validation.

Backport of b3a4488 (graphql#4890), adapted without fragment arguments.
Motivation: Reuse field-group matching when collected selection sets recur.

Backport of 0a81a6c (graphql#4893).
Motivation: Inline fragments are already collected at their enclosing response level; their nested fields remain independently visited.

Backport of 9fd9fe3 (graphql#4894).
Motivation: Keep nested diagnostic details bounded while retaining small messages.

Backport of 5680d04 (graphql#4895), omitting fragment-argument reporting.
Motivation: Retain representative conflict locations without repeatedly expanding their ancestry.

Backport of adaeb24 (graphql#4896).
Motivation: A lone fragment with no collected fields needs no comparison; its definition is validated separately.

Backport of ef9a666 (graphql#4898), adapted without fragment-argument preparation.
Spend a rule-local complexity budget on attempted comparisons and response-name matching. Abort validation when it is exhausted.

Motivation: Bound repeated validation work.

Backport of 19d0122 (graphql#4897), adapted without fragment scopes and preserving the v16 validation API.
@yaacovCR yaacovCR added the PR: bug fix 🐞 requires increase of "patch" version number label Oct 20, 2026
@vercel

vercel Bot commented Oct 20, 2026

Copy link
Copy Markdown

@yaacovCR is attempting to deploy a commit to the The GraphQL Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@yaacovCR
yaacovCR merged commit 982a365 into graphql:16.x.x Oct 21, 2026
20 of 21 checks passed
@yaacovCR
yaacovCR deleted the v16-overlap branch October 21, 2026 13:58
yaacovCR added a commit that referenced this pull request Nov 4, 2026
## v16.15.0 (2026-11-04)

#### New Feature 🚀
* [#4984](#4984) Backport v17 fixes to v16 ([@yaacovCR](https://github.com/yaacovCR))

#### Bug Fix 🐞
* [#4900](#4900) Backport OverlappingFieldsCanMerge changes (v16) ([@yaacovCR](https://github.com/yaacovCR))
* [#4909](#4909) Backport maxLexicalTokens, maxComments, maxSourceLength parser options (v16) ([@yaacovCR](https://github.com/yaacovCR))
* [#4917](#4917) fix: bound shared fragment traversal in introspection validation (v16) ([@yaacovCR](https://github.com/yaacovCR))

#### Docs 📝
* [#4911](#4911) docs: backport v17 updates to v16 ([@yaacovCR](https://github.com/yaacovCR))

#### Internal 🏠
* [#4826](#4826) chore(release): protect latest release channels from v16 ([@yaacovCR](https://github.com/yaacovCR))

#### Committers: 1
* Yaacov Rydzinski ([@yaacovCR](https://github.com/yaacovCR))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: bug fix 🐞 requires increase of "patch" version number

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant