mirror of
https://github.com/retailcrm/graphql-php.git
synced 2024-11-22 12:56:05 +03:00
Make 'errors' top property in response array
This commit is contained in:
parent
1c41fb27ed
commit
88b85c9761
@ -54,13 +54,13 @@ class ExecutionResult implements \JsonSerializable
|
||||
{
|
||||
$result = [];
|
||||
|
||||
if (null !== $this->data) {
|
||||
$result['data'] = $this->data;
|
||||
}
|
||||
|
||||
if (!empty($this->errors)) {
|
||||
$result['errors'] = array_map($this->errorFormatter, $this->errors);
|
||||
}
|
||||
|
||||
if (null !== $this->data) {
|
||||
$result['data'] = $this->data;
|
||||
}
|
||||
|
||||
if (!empty($this->extensions)) {
|
||||
$result['extensions'] = (array) $this->extensions;
|
||||
|
Loading…
Reference in New Issue
Block a user