src/Language/Node/Argument.php 1 location
|
@@ 8-26 (lines=19) @@
|
| 5 |
|
use Fubhy\GraphQL\Language\Location; |
| 6 |
|
use Fubhy\GraphQL\Language\Node; |
| 7 |
|
|
| 8 |
|
class Argument extends Node |
| 9 |
|
{ |
| 10 |
|
const KIND = Node::KIND_ARGUMENT; |
| 11 |
|
|
| 12 |
|
/** |
| 13 |
|
* Constructor. |
| 14 |
|
* |
| 15 |
|
* @param \Fubhy\GraphQL\Language\Node\Name $name |
| 16 |
|
* @param \Fubhy\GraphQL\Language\Node\ValueInterface $value |
| 17 |
|
* @param \Fubhy\GraphQL\Language\Location $location |
| 18 |
|
*/ |
| 19 |
|
public function __construct(Name $name, ValueInterface $value, Location $location = NULL) |
| 20 |
|
{ |
| 21 |
|
parent::__construct($location, [ |
| 22 |
|
'name' => $name, |
| 23 |
|
'value' => $value, |
| 24 |
|
]); |
| 25 |
|
} |
| 26 |
|
} |
| 27 |
|
|
src/Language/Node/Directive.php 1 location
|
@@ 8-26 (lines=19) @@
|
| 5 |
|
use Fubhy\GraphQL\Language\Location; |
| 6 |
|
use Fubhy\GraphQL\Language\Node; |
| 7 |
|
|
| 8 |
|
class Directive extends Node |
| 9 |
|
{ |
| 10 |
|
const KIND = Node::KIND_DIRECTIVE; |
| 11 |
|
|
| 12 |
|
/** |
| 13 |
|
* Constructor. |
| 14 |
|
* |
| 15 |
|
* @param \Fubhy\GraphQL\Language\Node\Name $name |
| 16 |
|
* @param \Fubhy\GraphQL\Language\Node\Argument[] $arguments |
| 17 |
|
* @param \Fubhy\GraphQL\Language\Location $location |
| 18 |
|
*/ |
| 19 |
|
public function __construct(Name $name, array $arguments = NULL, Location $location = NULL) |
| 20 |
|
{ |
| 21 |
|
parent::__construct($location, [ |
| 22 |
|
'name' => $name, |
| 23 |
|
'arguments' => $arguments, |
| 24 |
|
]); |
| 25 |
|
} |
| 26 |
|
} |
| 27 |
|
|
src/Language/Node/FragmentSpread.php 1 location
|
@@ 8-26 (lines=19) @@
|
| 5 |
|
use Fubhy\GraphQL\Language\Location; |
| 6 |
|
use Fubhy\GraphQL\Language\Node; |
| 7 |
|
|
| 8 |
|
class FragmentSpread extends Node implements SelectionInterface |
| 9 |
|
{ |
| 10 |
|
const KIND = Node::KIND_FRAGMENT_SPREAD; |
| 11 |
|
|
| 12 |
|
/** |
| 13 |
|
* Constructor. |
| 14 |
|
* |
| 15 |
|
* @param \Fubhy\GraphQL\Language\Node\Name $name |
| 16 |
|
* @param \Fubhy\GraphQL\Language\Node\Directive[] $directives |
| 17 |
|
* @param \Fubhy\GraphQL\Language\Location $location |
| 18 |
|
*/ |
| 19 |
|
public function __construct(Name $name, array $directives = [], Location $location = NULL) |
| 20 |
|
{ |
| 21 |
|
parent::__construct($location, [ |
| 22 |
|
'name' => $name, |
| 23 |
|
'directives' => $directives, |
| 24 |
|
]); |
| 25 |
|
} |
| 26 |
|
} |
| 27 |
|
|
src/Language/Node/ObjectField.php 1 location
|
@@ 8-26 (lines=19) @@
|
| 5 |
|
use Fubhy\GraphQL\Language\Location; |
| 6 |
|
use Fubhy\GraphQL\Language\Node; |
| 7 |
|
|
| 8 |
|
class ObjectField extends Node |
| 9 |
|
{ |
| 10 |
|
const KIND = Node::KIND_OBJECT_FIELD; |
| 11 |
|
|
| 12 |
|
/** |
| 13 |
|
* Constructor. |
| 14 |
|
* |
| 15 |
|
* @param \Fubhy\GraphQL\Language\Node\Name $name |
| 16 |
|
* @param \Fubhy\GraphQL\Language\Node\ValueInterface $value |
| 17 |
|
* @param \Fubhy\GraphQL\Language\Location $location |
| 18 |
|
*/ |
| 19 |
|
public function __construct(Name $name, ValueInterface $value, Location $location = NULL) |
| 20 |
|
{ |
| 21 |
|
parent::__construct($location, [ |
| 22 |
|
'name' => $name, |
| 23 |
|
'value' => $value, |
| 24 |
|
]); |
| 25 |
|
} |
| 26 |
|
} |
| 27 |
|
|
src/Language/Node/Variable.php 1 location
|
@@ 8-22 (lines=15) @@
|
| 5 |
|
use Fubhy\GraphQL\Language\Location; |
| 6 |
|
use Fubhy\GraphQL\Language\Node; |
| 7 |
|
|
| 8 |
|
class Variable extends Node implements ValueInterface |
| 9 |
|
{ |
| 10 |
|
const KIND = Node::KIND_VARIABLE; |
| 11 |
|
|
| 12 |
|
/** |
| 13 |
|
* Constructor. |
| 14 |
|
* |
| 15 |
|
* @param \Fubhy\GraphQL\Language\Node\Name $name |
| 16 |
|
* @param \Fubhy\GraphQL\Language\Location $location |
| 17 |
|
*/ |
| 18 |
|
public function __construct(Name $name = NULL, Location $location = NULL) |
| 19 |
|
{ |
| 20 |
|
parent::__construct($location, ['name' => $name]); |
| 21 |
|
} |
| 22 |
|
} |
| 23 |
|
|
src/Language/Node/VariableDefinition.php 1 location
|
@@ 8-32 (lines=25) @@
|
| 5 |
|
use Fubhy\GraphQL\Language\Location; |
| 6 |
|
use Fubhy\GraphQL\Language\Node; |
| 7 |
|
|
| 8 |
|
class VariableDefinition extends Node |
| 9 |
|
{ |
| 10 |
|
const KIND = Node::KIND_VARIABLE_DEFINITION; |
| 11 |
|
|
| 12 |
|
/** |
| 13 |
|
* Constructor. |
| 14 |
|
* |
| 15 |
|
* @param \Fubhy\GraphQL\Language\Node\Variable $variable |
| 16 |
|
* @param \Fubhy\GraphQL\Language\Node\TypeInterface $type |
| 17 |
|
* @param \Fubhy\GraphQL\Language\Node\ValueInterface $defaultValue |
| 18 |
|
* @param \Fubhy\GraphQL\Language\Location $location |
| 19 |
|
*/ |
| 20 |
|
public function __construct( |
| 21 |
|
Variable $variable, |
| 22 |
|
TypeInterface $type, |
| 23 |
|
ValueInterface $defaultValue = NULL, |
| 24 |
|
Location $location = NULL |
| 25 |
|
) { |
| 26 |
|
parent::__construct($location, [ |
| 27 |
|
'variable' => $variable, |
| 28 |
|
'type' => $type, |
| 29 |
|
'defaultValue' => $defaultValue, |
| 30 |
|
]); |
| 31 |
|
} |
| 32 |
|
} |
| 33 |
|
|