|
@@ 370-383 (lines=14) @@
|
| 367 |
|
return new Fragment($name, $typeCondition, $directives, $selectionSet, $location); |
| 368 |
|
} |
| 369 |
|
|
| 370 |
|
if ($this->is(Token::T_MUTATION)) { |
| 371 |
|
$location = $this->expect(Token::T_MUTATION)->location; |
| 372 |
|
|
| 373 |
|
$name = null; |
| 374 |
|
if ($this->is(Token::T_NAME)) { |
| 375 |
|
$name = $this->expect(Token::T_NAME)->value; |
| 376 |
|
} |
| 377 |
|
|
| 378 |
|
$variables = $this->parseVariableDefinitionList(); |
| 379 |
|
$directives = $this->parseDirectiveList(); |
| 380 |
|
$selectionSet = $this->parseSelectionSet(); |
| 381 |
|
|
| 382 |
|
return new OperationMutation($name, $variables, $directives, $selectionSet, $location); |
| 383 |
|
} |
| 384 |
|
|
| 385 |
|
if ($this->is(Token::T_SUBSCRIPTION)) { |
| 386 |
|
$location = $this->expect(Token::T_SUBSCRIPTION)->location; |
|
@@ 385-398 (lines=14) @@
|
| 382 |
|
return new OperationMutation($name, $variables, $directives, $selectionSet, $location); |
| 383 |
|
} |
| 384 |
|
|
| 385 |
|
if ($this->is(Token::T_SUBSCRIPTION)) { |
| 386 |
|
$location = $this->expect(Token::T_SUBSCRIPTION)->location; |
| 387 |
|
|
| 388 |
|
$name = null; |
| 389 |
|
if ($this->is(Token::T_NAME)) { |
| 390 |
|
$name = $this->expect(Token::T_NAME)->value; |
| 391 |
|
} |
| 392 |
|
|
| 393 |
|
$variables = $this->parseVariableDefinitionList(); |
| 394 |
|
$directives = $this->parseDirectiveList(); |
| 395 |
|
$selectionSet = $this->parseSelectionSet(); |
| 396 |
|
|
| 397 |
|
return new OperationSubscription($name, $variables, $directives, $selectionSet, $location); |
| 398 |
|
} |
| 399 |
|
|
| 400 |
|
if ($this->is(Token::T_QUERY)) { |
| 401 |
|
$location = $this->expect(Token::T_QUERY)->location; |
|
@@ 400-413 (lines=14) @@
|
| 397 |
|
return new OperationSubscription($name, $variables, $directives, $selectionSet, $location); |
| 398 |
|
} |
| 399 |
|
|
| 400 |
|
if ($this->is(Token::T_QUERY)) { |
| 401 |
|
$location = $this->expect(Token::T_QUERY)->location; |
| 402 |
|
|
| 403 |
|
$name = null; |
| 404 |
|
if ($this->is(Token::T_NAME)) { |
| 405 |
|
$name = $this->expect(Token::T_NAME)->value; |
| 406 |
|
} |
| 407 |
|
|
| 408 |
|
$variables = $this->parseVariableDefinitionList(); |
| 409 |
|
$directives = $this->parseDirectiveList(); |
| 410 |
|
$selectionSet = $this->parseSelectionSet(); |
| 411 |
|
|
| 412 |
|
return new OperationQuery($name, $variables, $directives, $selectionSet, $location); |
| 413 |
|
} |
| 414 |
|
|
| 415 |
|
if ($this->is(Token::T_BRACE_LEFT)) { |
| 416 |
|
$selectionSet = $this->parseSelectionSet(); |