1 | <?php |
||
20 | class RegistrationMutation extends AbstractMutation |
||
21 | { |
||
22 | /** |
||
23 | * @var array |
||
24 | */ |
||
25 | protected $attributes = [ |
||
26 | 'name' => 'register', |
||
27 | ]; |
||
28 | |||
29 | /** |
||
30 | * @return array |
||
31 | */ |
||
32 | public function queryArguments(): array |
||
33 | { |
||
34 | return [ |
||
35 | 'name' => [ |
||
36 | 'type' => Type::nonNull(Type::string()), |
||
37 | 'description' => 'User name', |
||
38 | ], |
||
39 | 'email' => [ |
||
40 | 'type' => Type::nonNull(Type::string()), |
||
41 | 'description' => 'User email', |
||
42 | ], |
||
43 | 'password' => [ |
||
44 | 'type' => Type::nonNull(Type::string()), |
||
45 | 'description' => 'User password', |
||
46 | ], |
||
47 | 'password_confirmation' => [ |
||
48 | 'type' => Type::nonNull(Type::string()), |
||
49 | 'description' => 'User password confirmation', |
||
50 | ], |
||
51 | ]; |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * @return \GraphQL\Type\Definition\ObjectType|mixed|null |
||
56 | */ |
||
57 | public function type() |
||
61 | |||
62 | /** |
||
63 | * @return array |
||
64 | */ |
||
65 | public function rules(): array |
||
83 | |||
84 | /** |
||
85 | * @param $root |
||
86 | * @param $args |
||
87 | * @return array |
||
88 | */ |
||
89 | public function resolve($root, $args) |
||
95 | } |
||
96 |