public function serialiseResult($executionResult)
    {
        // Format object
        if (!empty($executionResult->errors)) {
            return [
                'data' => $executionResult->data,
                'errors' => array_map($this->errorFormatter, $executionResult->errors),
            ];
        } else {
            return [
                'data' => $executionResult->data,
            ];
        }
    }
public function serialiseResult($executionResult)
    {
        // Format object
        if (!empty($executionResult->errors)) {
            return [
                'data' => $executionResult->data,
                'errors' => array_map($this->errorFormatter, $executionResult->errors),
            ];
        } else {
            return [
                'data' => $executionResult->data,
            ];
        }
    }
public function serialiseResult ( $ executionResult ) { // Format object if ( ! empty ( $ executionResult -> errors ) ) { return [ 'data' => $ executionResult -> data , 'errors' => array_map ( $ this -> errorFormatter , $ executionResult -> errors ) , ] ; } else { return [ 'data' => $ executionResult -> data , ] ; } }
Serialise a Graphql result object for output

@param ExecutionResult $executionResult
@return array
Serialise a Graphql result object for output