Skip to content

Commit 94a0027

Browse files
committed
fix formatting
1 parent f306736 commit 94a0027

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

spec/Section 5 -- Validation.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,8 @@ fragment directFieldSelectionOnUnion on CatOrDog {
418418

419419
FieldsInSetCanMerge(set):
420420

421-
- Let {visitedSelections} be the selections in {set} including visiting
422-
fields, fragment-spreads and inline fragments.
421+
- Let {visitedSelections} be the selections in {set} including visiting fields,
422+
fragment-spreads and inline fragments.
423423
- Let {spreadsForName} be the set of fragment spreads with a given name in
424424
{visitedSelections}.
425425
- For each {spreadsForName} as {name} and {spreads}:
@@ -599,11 +599,11 @@ query {
599599
}
600600
```
601601

602-
If two fragment spreads with the same name, and hence the same selection,
603-
supply different argument values, their fields will not be able to merge.
604-
In this case, validation fails because the fragment spread `...commandFragment(command: SIT)`
605-
and `...commandFragment(command: DOWN)` are part of the visited selections that will
606-
be merged.
602+
If two fragment spreads with the same name, and hence the same selection, supply
603+
different argument values, their fields will not be able to merge. In this case,
604+
validation fails because the fragment spread `...commandFragment(command: SIT)`
605+
and `...commandFragment(command: DOWN)` are part of the visited selections that
606+
will be merged.
607607

608608
If both of these spreads would have `$commandOne` or `$commandTwo` as the
609609
argument-value, it would be allowed as we can be sure that we'd resolve
@@ -1735,8 +1735,8 @@ query takesCatOrDog($catOrDog: CatOrDog) {
17351735
- Let {fragments} be every fragment referenced by that {operation}
17361736
transitively.
17371737
- For each {fragment} in {fragments}:
1738-
- For each {variableUsage} in scope of {fragment}, variable must be in either
1739-
{fragment}'s or {operation}'s variable list or both.
1738+
- For each {variableUsage} in scope of {fragment}, variable must be in
1739+
either {fragment}'s or {operation}'s variable list or both.
17401740

17411741
**Explanatory Text**
17421742

@@ -1770,10 +1770,10 @@ query variableIsNotDefined {
17701770
${atOtherHomes} is not defined by the operation.
17711771

17721772
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.
17771777

17781778
For example the following is valid:
17791779

@@ -1933,7 +1933,9 @@ fragment isHouseTrainedWithoutVariableFragment on Dog {
19331933
Fragment arguments can shadow operation variables: fragments that use an
19341934
argument are not using the operation-defined variable of the same name.
19351935

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
1938+
the same name:
19371939

19381940
```graphql counter-example
19391941
query variableNotUsedWithinFragment($atOtherHomes: Boolean) {
@@ -1983,7 +1985,9 @@ variable.
19831985

19841986
- For every {fragment} in the document:
19851987
- 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
1990+
spreads.
19871991

19881992
**Explanatory Text**
19891993

0 commit comments

Comments
 (0)