@@ 423-431 (lines=9) @@ | ||
420 | return new Fragment($name, $typeCondition, $directives, $selectionSet); |
|
421 | } |
|
422 | ||
423 | if ($this->is(Token::T_MUTATION)) { |
|
424 | $this->expect(Token::T_MUTATION); |
|
425 | $name = $this->expect(Token::T_NAME)->value; |
|
426 | $variables = $this->parseVariableDefinitionList(); |
|
427 | $directives = $this->parseDirectiveList(); |
|
428 | $selectionSet = $this->parseSelectionSet(); |
|
429 | ||
430 | return new OperationMutation($name, $variables, $directives, $selectionSet); |
|
431 | } |
|
432 | ||
433 | if ($this->is(Token::T_SUBSCRIPTION)) { |
|
434 | $this->expect(Token::T_SUBSCRIPTION); |
|
@@ 433-441 (lines=9) @@ | ||
430 | return new OperationMutation($name, $variables, $directives, $selectionSet); |
|
431 | } |
|
432 | ||
433 | if ($this->is(Token::T_SUBSCRIPTION)) { |
|
434 | $this->expect(Token::T_SUBSCRIPTION); |
|
435 | $name = $this->expect(Token::T_NAME)->value; |
|
436 | $variables = $this->parseVariableDefinitionList(); |
|
437 | $directives = $this->parseDirectiveList(); |
|
438 | $selectionSet = $this->parseSelectionSet(); |
|
439 | ||
440 | return new OperationSubscription($name, $variables, $directives, $selectionSet); |
|
441 | } |
|
442 | ||
443 | if ($this->is(Token::T_QUERY)) { |
|
444 | $this->expect(Token::T_QUERY); |