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
1773
-
operation has access to the variables defined by that operation and also those defined on
1774
-
the fragment. Fragments can appear within multiple operations and therefore
1775
-
variable usages not defined on the fragment must correspond to variable
1776
-
definitions in all of those operations.
1773
+
operation has access to the variables defined by that operation and also those
1774
+
defined on the fragment. Fragments can appear within multiple operations and
1775
+
therefore variable usages not defined on the fragment must correspond to
1776
+
variable definitions in all of those operations.
1777
1777
1778
1778
For example the following is valid:
1779
1779
@@ -1933,7 +1933,9 @@ fragment isHouseTrainedWithoutVariableFragment on Dog {
1933
1933
Fragment arguments can shadow operation variables: fragments that use an
1934
1934
argument are not using the operation-defined variable of the same name.
1935
1935
1936
-
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:
1936
+
As such, it would be invalid if the operation defined a variable and variables
1937
+
of that name were used exclusively inside fragments that define a variable with
- Let {variables} be the variables defined by that {fragment}.
1986
-
- Each {variable} in {variables} must be used at least once transitively within the fragment's selection set excluding traversal of named fragment spreads.
1988
+
- Each {variable} in {variables} must be used at least once transitively
1989
+
within the fragment's selection set excluding traversal of named fragment
0 commit comments