kuvalda-api/schema/ResultSaveErrorType.php

30 lines
723 B
PHP
Raw Permalink Normal View History

2024-11-20 15:32:19 +03:00
<?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);
}
}