Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field merging validation: clarify pair members are distinct #1136

Merged
merged 2 commits into from
Feb 26, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions spec/Section 5 -- Validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ FieldsInSetCanMerge(set):

- Let {fieldsForName} be the set of selections with a given response name in
{set} including visiting fragments and inline fragments.
- Given each pair of members {fieldA} and {fieldB} in {fieldsForName}:
- Given each pair of distinct members {fieldA} and {fieldB} in {fieldsForName}:
- {SameResponseShape(fieldA, fieldB)} must be true.
- If the parent types of {fieldA} and {fieldB} are equal or if either is not
an Object Type:
Expand Down Expand Up @@ -452,7 +452,8 @@ SameResponseShape(fieldA, fieldB):
selection set of {fieldB}.
- Let {fieldsForName} be the set of selections with a given response name in
{mergedSet} including visiting fragments and inline fragments.
- Given each pair of members {subfieldA} and {subfieldB} in {fieldsForName}:
- Given each pair of distinct members {subfieldA} and {subfieldB} in
{fieldsForName}:
- If {SameResponseShape(subfieldA, subfieldB)} is {false}, return {false}.
- Return {true}.

Expand Down