From ac9fdbcb96a2dd5f886e77ea00c768da320a801a Mon Sep 17 00:00:00 2001 From: Jovi De Croock Date: Wed, 27 Mar 2024 14:38:26 +0100 Subject: [PATCH] conciser validation --- spec/Section 5 -- Validation.md | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/spec/Section 5 -- Validation.md b/spec/Section 5 -- Validation.md index 44183b4ef..79687f090 100644 --- a/spec/Section 5 -- Validation.md +++ b/spec/Section 5 -- Validation.md @@ -579,8 +579,6 @@ fragment conflictingDifferingResponses on Pet { Fragment spread arguments can also cause fields to fail to merge. -While the following is valid: - ```graphql example fragment commandFragment($command: DogCommand!) on Dog { doesKnowCommand(dogCommand: $command) @@ -588,26 +586,12 @@ fragment commandFragment($command: DogCommand!) on Dog { fragment potentiallyConflictingArguments( $commandOne: DogCommand! - $commandTwo: DogCommand! ) on Dog { ...commandFragment(command: $commandOne) ...commandFragment(command: $commandTwo) } fragment safeFragmentArguments on Dog { - ...potentiallyConflictingArguments(commandOne: SIT, commandTwo: SIT) -} -``` - -it is only valid because `safeFragmentArguments` uses -`potentiallyConflictingArguments` with the same value for the fragment-defined -variables `commandOne` and `commandTwo`. Therefore `commandFragment` resolves -`doesKnowCommand`'s `dogCommand` argument value to `SIT` in both cases. - -However, by changing the fragment spread argument values: - -```graphql counter-example -fragment conflictingFragmentArguments on Dog { ...potentiallyConflictingArguments(commandOne: SIT, commandTwo: DOWN) } ```