@@ -418,8 +418,14 @@ fragment directFieldSelectionOnUnion on CatOrDog {
418418
419419FieldsInSetCanMerge(set):
420420
421+ - Let {visitedSelections} be the selections in {set} including visiting
422+ fragments and inline fragments an applying any supplied fragment arguments.
423+ - Let {spreadsForName} be the set of fragment spreads with a given name in
424+ {visitedSelections}.
425+ - Given each pair of members {spreadA} and {spreadB} in {spreadsForName}:
426+ - {spreadA} and {spreadB} must have identical sets of arguments.
421427- Let {fieldsForName} be the set of selections with a given response name in
422- {set} including visiting fragments and inline fragments .
428+ {visitedSelections} .
423429- Given each pair of members {fieldA} and {fieldB} in {fieldsForName}:
424430 - {SameResponseShape(fieldA, fieldB)} must be true.
425431 - If the parent types of {fieldA} and {fieldB} are equal or if either is not
@@ -605,14 +611,14 @@ fragment conflictingFragmentArguments on Dog {
605611}
606612```
607613
608- the response will have two conflicting versions of the ` doesKnowCommand ` that
609- cannot merge.
614+ the response will have two conflicting versions of the ` doesKnowCommand `
615+ fragment that cannot merge.
610616
611- One strategy to resolving field conflicts caused by duplicated fragment spreads
612- is to short-circuit when two fragment spreads with the same name are found to be
613- merging with different argument values. In this case, validation could short
614- circuit when ` commandFragment(command: SIT ) ` is merged with
615- ` commandFragment(command: DOWN) ` .
617+ If two fragment spreads with the same name supply different argument values,
618+ their fields will not be able to merge. In this case, validation fails because
619+ the fragment spread ` ...commandFragment(command: SIT) ` and
620+ ` ... commandFragment(command: DOWN )` are part of the visited selections that will
621+ be merged .
616622
617623### Leaf Field Selections
618624
@@ -729,7 +735,7 @@ fragment usesFragmentArg on Dog {
729735}
730736```
731737
732- the following is invalid since ` command: ` is not defined on
738+ The following is invalid since ` command ` is not defined on
733739` Dog.doesKnowCommand ` .
734740
735741``` graphql counter-example
@@ -738,7 +744,7 @@ fragment invalidArgName on Dog {
738744}
739745```
740746
741- and this is also invalid as ` $ dogCommand` is not defined on fragment
747+ and this is also invalid as the argument ` dogCommand ` is not defined on fragment
742748` withFragmentArg ` .
743749
744750``` graphql counter-example
@@ -1892,7 +1898,7 @@ fragment isHouseTrainedWithoutVariableFragment on Dog {
18921898```
18931899
18941900Fragment arguments can shadow operation variables: fragments that use an
1895- argument are not using the operation defined variable of the same name.
1901+ argument are not using the operation- defined variable of the same name.
18961902
18971903Likewise, it would be invalid if the variable was shadowed by a fragment
18981904argument:
@@ -1911,7 +1917,7 @@ fragment shadowedVariableFragment($atOtherHomes: Boolean) on Dog {
19111917
19121918because
19131919{$atOtherHomes} is only referenced in a fragment that defines it as a
1914- locally scoped argument, the operation defined {$atOtherHomes}
1920+ locally scoped argument, the operation- defined {$atOtherHomes}
19151921variable is never used.
19161922
19171923All operations in a document must use all of their variables.
@@ -1951,11 +1957,10 @@ variable.
19511957** Explanatory Text**
19521958
19531959All arguments defined by a fragment must be used in that same fragment. Because
1954- fragment arguments are scoped to the fragment they're defined on, if the
1955- fragment does not contain a variable with the same name as the argument, then
1956- the argument is superfluous.
1960+ fragment arguments are scoped to the fragment they are defined on, if the
1961+ fragment does not use the argument, then the argument is superfluous.
19571962
1958- For example the following is invalid:
1963+ For example, the following is invalid:
19591964
19601965``` graphql counter-example
19611966query queryWithFragmentArgUnused ($atOtherHomes : Boolean ) {
0 commit comments