@@ 5-21 (lines=17) @@ | ||
2 | ||
3 | namespace HansOtt\GraphQL\Query; |
|
4 | ||
5 | final class Argument extends NodeBase |
|
6 | { |
|
7 | public $name; |
|
8 | public $value; |
|
9 | ||
10 | public function __construct($name, Value $value, Location $location = null) |
|
11 | { |
|
12 | parent::__construct($location); |
|
13 | $this->name = (string) $name; |
|
14 | $this->value = $value; |
|
15 | } |
|
16 | ||
17 | public function getChildren() |
|
18 | { |
|
19 | return array($this->value); |
|
20 | } |
|
21 | } |
|
22 |
@@ 5-21 (lines=17) @@ | ||
2 | ||
3 | namespace HansOtt\GraphQL\Query; |
|
4 | ||
5 | final class ValueObjectField extends NodeBase |
|
6 | { |
|
7 | public $name; |
|
8 | public $value; |
|
9 | ||
10 | public function __construct($name, Value $value, Location $location = null) |
|
11 | { |
|
12 | parent::__construct($location); |
|
13 | $this->name = (string) $name; |
|
14 | $this->value = $value; |
|
15 | } |
|
16 | ||
17 | public function getChildren() |
|
18 | { |
|
19 | return array($this->value); |
|
20 | } |
|
21 | } |
|
22 |