You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fragments complicate this rule. Any fragment transitively included by an
1771
-
operation has access to the variables defined by that operation and defined on
1771
+
operation has access to the variables defined by that operation and also those defined on
1772
1772
the fragment. Fragments can appear within multiple operations and therefore
1773
1773
variable usages not defined on the fragment must correspond to variable
1774
1774
definitions in all of those operations.
@@ -1931,8 +1931,7 @@ fragment isHouseTrainedWithoutVariableFragment on Dog {
1931
1931
Fragment arguments can shadow operation variables: fragments that use an
1932
1932
argument are not using the operation-defined variable of the same name.
1933
1933
1934
-
Likewise, it would be invalid if the variable was shadowed by a fragment
1935
-
argument:
1934
+
As such, it would be invalid if the operation defined a variable and variables of that name were used exclusively inside fragments that define a variable with the same name:
- Let {variables} be the variables defined by that {fragment}.
1985
-
- Each {variable} in {variables} must be used at least once in the fragment's
1986
-
scope.
1984
+
- Each {variable} in {variables} must be used at least once transitively within the fragment's selection set excluding traversal of named fragment spreads.
0 commit comments