File tree Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -609,8 +609,29 @@ validation fails because the fragment spread `...commandFragment(command: SIT)`
609609and ` ...commandFragment(command: DOWN) ` are part of the visited selections that
610610will be merged.
611611
612- If both of these spreads had used the same variable for the argument value, it
613- would be allowed as we can be sure that we'd resolve identical fields.
612+ If both of these spreads had used the same value for the argument value, it
613+ would be allowed as we can be sure that we would resolve identical fields.
614+ Spreads that use different variables that would always resolve to the same value
615+ are also valid. For example, the following is valid:
616+
617+ ``` graphql example
618+ fragment commandFragment ($command : DogCommand ! ) on Dog {
619+ doesKnowCommand (dogCommand : $command )
620+ }
621+
622+ fragment noConflictWhenPassedOperationCommand (
623+ $fragmentCommand : DogCommand !
624+ ) on Dog {
625+ ... commandFragment (command : $operationCommand )
626+ ... commandFragment (command : $fragmentCommand )
627+ }
628+
629+ query ($operationCommand : DogCommand ! ) {
630+ pet {
631+ ... noConflictWhenPassedOperationCommand (fragmentCommand : $operationCommand )
632+ }
633+ }
634+ ```
614635
615636### Leaf Field Selections
616637
You can’t perform that action at this time.
0 commit comments