30 lines
723 B
PHP
30 lines
723 B
PHP
<?php
|
|
|
|
|
|
namespace dominion\api\schema;
|
|
|
|
use GraphQL\Type\Definition\ObjectType;
|
|
use GraphQL\Type\Definition\Type;
|
|
|
|
class ResultSaveErrorType extends ObjectType
|
|
{
|
|
public function __construct()
|
|
{
|
|
$config = [
|
|
'fields' => function() {
|
|
return [
|
|
'code' => [
|
|
'type' => Type::string(),
|
|
'description' => 'поле',
|
|
],
|
|
'messages' => [
|
|
'type' => Type::listOf(Type::string()),
|
|
'description' => 'текст ошибки',
|
|
],
|
|
];
|
|
}
|
|
];
|
|
|
|
parent::__construct($config);
|
|
}
|
|
} |