Completed
Push — master ( f8702a...461e07 )
by Alexandr
04:08
created

PostInputType::build()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
/**
3
 * PostInputType.php
4
 */
5
6
namespace Examples\Blog\Schema;
7
8
9
use Youshido\GraphQL\Type\Config\InputTypeConfigInterface;
10
use Youshido\GraphQL\Type\NonNullType;
11
use Youshido\GraphQL\Type\Object\AbstractInputObjectType;
12
use Youshido\GraphQL\Type\Scalar\StringType;
13
14
class PostInputType extends AbstractInputObjectType
15
{
16
17
    public function build(InputTypeConfigInterface $config)
18
    {
19
        $config
20
            ->addField('title', new NonNullType(new StringType()))
21
            ->addField('summary', new StringType());
22
    }
23
24
25
}
26