Completed
Pull Request — master (#204)
by Ryan
11:34
created

PostInputType   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

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