| @@ 22-30 (lines=9) @@ | ||
| 19 | { |
|
| 20 | use FieldsAwareConfigTrait, ArgumentsAwareConfigTrait; |
|
| 21 | ||
| 22 | public function getRules() |
|
| 23 | { |
|
| 24 | return [ |
|
| 25 | 'name' => ['type' => TypeService::TYPE_STRING, 'required' => true], |
|
| 26 | 'types' => ['type' => TypeService::TYPE_ARRAY_OF_OBJECT_TYPES], |
|
| 27 | 'description' => ['type' => TypeService::TYPE_STRING], |
|
| 28 | 'resolveType' => ['type' => TypeService::TYPE_CALLABLE, 'final' => true] |
|
| 29 | ]; |
|
| 30 | } |
|
| 31 | } |
|
| 32 | ||
| @@ 39-48 (lines=10) @@ | ||
| 36 | } |
|
| 37 | ||
| 38 | ||
| 39 | public function getRules() |
|
| 40 | { |
|
| 41 | return [ |
|
| 42 | 'query' => ['type' => TypeService::TYPE_OBJECT_TYPE, 'required' => true], |
|
| 43 | 'mutation' => ['type' => TypeService::TYPE_OBJECT_TYPE], |
|
| 44 | 'types' => ['type' => TypeService::TYPE_ARRAY], |
|
| 45 | 'directives' => ['type' => TypeService::TYPE_ARRAY], |
|
| 46 | 'name' => ['type' => TypeService::TYPE_STRING], |
|
| 47 | ]; |
|
| 48 | } |
|
| 49 | ||
| 50 | protected function build() |
|
| 51 | { |
|