Completed
Push — master ( 34956e...ae96c2 )
by Quang
9s
created

AbstractNodeField::getDescription()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Digia\Lumen\GraphQL\Fields;
4
5
use Youshido\GraphQL\Config\Field\FieldConfig;
6
use Youshido\GraphQL\Type\NonNullType;
7
use Youshido\GraphQL\Type\Scalar\IdType;
8
9
abstract class AbstractNodeField extends AbstractEntityField
10
{
11
12
    /**
13
     * @inheritdoc
14
     */
15
    public function getDescription()
16
    {
17
        return 'Returns a node with the given ID.';
18
    }
19
20
    /**
21
     * @inheritdoc
22
     */
23
    public function build(FieldConfig $config)
24
    {
25
        $config->addArgument('id', new NonNullType(new IdType()));
26
    }
27
}
28