@@ -279,7 +279,10 @@ fragment directFieldSelectionOnUnion on CatOrDog {
279279
280280** Formal Specification **
281281
282- * Let {set} be any selection set defined in the GraphQL document
282+ * Let {set} be any selection set defined in the GraphQL document.
283+ * {FieldsInSetCanMerge(set)} must be true.
284+
285+ FieldsInSetCanMerge(set) :
283286 * Let {fieldsForName} be the set of selections with a given response name in
284287 {set} including visiting fragments and inline fragments.
285288 * Given each pair of members {fieldA} and {fieldB} in {fieldsForName}:
@@ -288,13 +291,16 @@ fragment directFieldSelectionOnUnion on CatOrDog {
288291 * {fieldA} and {fieldB} must have identical field names.
289292 * {fieldA} and {fieldB} must have identical return type.
290293 * {fieldA} and {fieldB} must have identical sets of arguments.
294+ * Let {mergedSet} be the result of adding the selection set of {fieldA}
295+ and the selection set of {fieldB}.
296+ * {FieldsInSetCanMerge(mergedSet)} must be true.
291297
292298** Explanatory Text **
293299
294300If multiple fields selections with the same response names are encountered
295- during execution, the result should be unambiguous. Therefore any two field
296- selections which might both be encountered for the same object are only valid if
297- they are equivalent.
301+ during execution, the field and arguments to execute and the resulting value
302+ should be unambiguous. Therefore any two field selections which might both be
303+ encountered for the same object are only valid if they are equivalent.
298304
299305For simple hand-written GraphQL, this rule is obviously a clear developer error,
300306however nested fragments can make this difficult to detect manually.
0 commit comments