Skip to content

Commit fae5e51

Browse files
matprecleebyron
authored andcommitted
Fix SameResponseShape definition (#451)
* Fix `SameResponseShape` definition * Capitalize first letter * Address review * Address review v2
1 parent 8b9d351 commit fae5e51

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

spec/Section 5 -- Validation.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -421,23 +421,25 @@ SameResponseShape(fieldA, fieldB) :
421421
* Let {typeA} be the return type of {fieldA}.
422422
* Let {typeB} be the return type of {fieldB}.
423423
* If {typeA} or {typeB} is Non-Null.
424-
* {typeA} and {typeB} must both be Non-Null.
424+
* If {typeA} or {typeB} is nullable, return false.
425425
* Let {typeA} be the nullable type of {typeA}
426426
* Let {typeB} be the nullable type of {typeB}
427427
* If {typeA} or {typeB} is List.
428-
* {typeA} and {typeB} must both be List.
428+
* If {typeA} or {typeB} is not List, return false.
429429
* Let {typeA} be the item type of {typeA}
430430
* Let {typeB} be the item type of {typeB}
431431
* Repeat from step 3.
432432
* If {typeA} or {typeB} is Scalar or Enum.
433-
* {typeA} and {typeB} must be the same type.
434-
* Assert: {typeA} and {typeB} are both composite types.
433+
* If {typeA} and {typeB} are the same type return true, otherwise return
434+
false.
435+
* If {typeA} or {typeB} is not a composite type, return false.
435436
* Let {mergedSet} be the result of adding the selection set of {fieldA} and
436437
the selection set of {fieldB}.
437438
* Let {fieldsForName} be the set of selections with a given response name in
438439
{mergedSet} including visiting fragments and inline fragments.
439440
* Given each pair of members {subfieldA} and {subfieldB} in {fieldsForName}:
440-
* {SameResponseShape(subfieldA, subfieldB)} must be true.
441+
* If {SameResponseShape(subfieldA, subfieldB)} is false, return false.
442+
* Return true.
441443

442444
**Explanatory Text**
443445

0 commit comments

Comments
 (0)