<?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); } }