@@ -426,6 +426,7 @@ FieldsInSetCanMerge(set):
426426
427427SameResponseShape(fieldA, fieldB):
428428
429+ <<<<<<< HEAD
429430- Let {typeA} be the return type of {fieldA}.
430431- Let {typeB} be the return type of {fieldB}.
431432- If {typeA} or {typeB} is Non-Null.
@@ -448,6 +449,34 @@ SameResponseShape(fieldA, fieldB):
448449- Given each pair of members {subfieldA} and {subfieldB} in {fieldsForName}:
449450 - If {SameResponseShape(subfieldA, subfieldB)} is false, return false.
450451- Return true.
452+ =======
453+ * Let {typeA} be the return type of {fieldA}.
454+ * Let {typeB} be the return type of {fieldB}.
455+ * Let {fieldARequiredStatus} be the required status of {fieldA}
456+ * Let {fieldBRequiredStatus} be the required status of {fieldB}
457+ * Let {typeA} be the result of {ModifiedOutputType(typeA, fieldARequiredStatus)}
458+ * Let {typeB} be the result of {ModifiedOutputType(typeB, fieldBRequiredStatus)}
459+ * If {typeA} or {typeB} is Non-Null.
460+ * If {typeA} or {typeB} is nullable, return false.
461+ * Let {typeA} be the nullable type of {typeA}
462+ * Let {typeB} be the nullable type of {typeB}
463+ * If {typeA} or {typeB} is List.
464+ * If {typeA} or {typeB} is not List, return false.
465+ * Let {typeA} be the item type of {typeA}
466+ * Let {typeB} be the item type of {typeB}
467+ * Repeat from step 3.
468+ * If {typeA} or {typeB} is Scalar or Enum.
469+ * If {typeA} and {typeB} are the same type return true, otherwise return
470+ false.
471+ * Assert: {typeA} and {typeB} are both composite types.
472+ * Let {mergedSet} be the result of adding the selection set of {fieldA} and
473+ the selection set of {fieldB}.
474+ * Let {fieldsForName} be the set of selections with a given response name in
475+ {mergedSet} including visiting fragments and inline fragments.
476+ * Given each pair of members {subfieldA} and {subfieldB} in {fieldsForName}:
477+ * If {SameResponseShape(subfieldA, subfieldB)} is false, return false.
478+ * Return true.
479+ >>>>>>> 9906241 (errors and validation formal definitions)
451480
452481** Explanatory Text**
453482
0 commit comments