Completed
Push — graphql-auth ( 67a3fb...eab2f1 )
by
unknown
03:31
created

AuthType   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A fields() 0 7 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: dmitry
5
 * Date: 28.03.17
6
 * Time: 11:55
7
 */
8
9
namespace App\GraphQL\Types;
10
11
12
use GraphQL\Type\Definition\Type;
13
14
class AuthType extends UserType
15
{
16
    protected $attributes = [
17
        'name' => 'AuthType',
18
        'description' => 'Auth Object type'
19
    ];
20
21
    public function fields(): array
22
    {
23
        $fields = parent::fields();
24
        $fields['token'] = ['type' => Type::nonNull(Type::string()),
25
        'description' => 'User secret auth token'];
26
        return $fields;
27
    }
28
}