Skip to content

Commit

Permalink
clarify example
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed May 20, 2024
1 parent b60feac commit 3516ca1
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions spec/Section 5 -- Validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -591,15 +591,17 @@ fragment potentiallyConflictingArguments(
...commandFragment(command: $commandTwo)
}

fragment safeFragmentArguments on Dog {
...potentiallyConflictingArguments(commandOne: SIT, commandTwo: DOWN)
query {
pet {
...potentiallyConflictingArguments(commandOne: SIT, commandTwo: DOWN)
}
}
```

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

If both of these spreads would have `$commandOne` or `$commandTwo` as the
Expand Down

0 comments on commit 3516ca1

Please sign in to comment.