1 | <?php |
||
18 | class GlobalIdField extends AbstractField |
||
19 | { |
||
20 | |||
21 | /** @var string */ |
||
22 | protected $typeName; |
||
23 | |||
24 | /** |
||
25 | * @param string $typeName |
||
26 | */ |
||
27 | 1 | public function __construct($typeName) |
|
28 | { |
||
29 | 1 | $this->typeName = $typeName; |
|
30 | |||
31 | $config = [ |
||
32 | 1 | 'type' => $this->getType(), |
|
33 | 1 | 'name' => $this->getName(), |
|
34 | 1 | 'resolve' => [$this, 'resolve'] |
|
35 | ]; |
||
36 | |||
37 | 1 | parent::__construct($config); |
|
38 | 1 | } |
|
39 | |||
40 | 1 | public function getName() |
|
44 | |||
45 | 1 | public function getDescription() |
|
49 | |||
50 | 1 | public function getType() |
|
54 | |||
55 | /** |
||
56 | * @inheritdoc |
||
57 | */ |
||
58 | public function resolve($value, array $args, ResolveInfo $info) |
||
62 | } |
||
63 |