@@ -10,14 +10,12 @@ |
||
| 10 | 10 | |
| 11 | 11 | use function array_key_exists; |
| 12 | 12 | use Youshido\GraphQL\Exception\Parser\InvalidRequestException; |
| 13 | -use Youshido\GraphQL\Parser\Ast\ArgumentValue\Literal; |
|
| 14 | 13 | use Youshido\GraphQL\Parser\Ast\ArgumentValue\Variable; |
| 15 | 14 | use Youshido\GraphQL\Parser\Ast\ArgumentValue\VariableReference; |
| 16 | 15 | use Youshido\GraphQL\Parser\Ast\Fragment; |
| 17 | 16 | use Youshido\GraphQL\Parser\Ast\FragmentReference; |
| 18 | 17 | use Youshido\GraphQL\Parser\Ast\Mutation; |
| 19 | 18 | use Youshido\GraphQL\Parser\Ast\Query; |
| 20 | -use Youshido\GraphQL\Parser\Location; |
|
| 21 | 19 | |
| 22 | 20 | class Request |
| 23 | 21 | { |
@@ -219,11 +219,15 @@ |
||
| 219 | 219 | $this->variables = $variables; |
| 220 | 220 | foreach ($this->variableReferences as $reference) { |
| 221 | 221 | /** invalid request with no variable */ |
| 222 | - if (!$reference->getVariable()) continue; |
|
| 222 | + if (!$reference->getVariable()) { |
|
| 223 | + continue; |
|
| 224 | + } |
|
| 223 | 225 | $variableName = $reference->getVariable()->getName(); |
| 224 | 226 | |
| 225 | 227 | /** no variable was set at the time */ |
| 226 | - if (!array_key_exists($variableName, $variables)) continue; |
|
| 228 | + if (!array_key_exists($variableName, $variables)) { |
|
| 229 | + continue; |
|
| 230 | + } |
|
| 227 | 231 | |
| 228 | 232 | $reference->getVariable()->setValue($variables[$variableName]); |
| 229 | 233 | $reference->setValue($variables[$variableName]); |