magento / graphql-ce

[ARCHIVED] Please use magento/magento2 project
https://github.com/magento/magento2
Open Software License 3.0
131 stars 156 forks source link

magento graphql-ce#970 Cannot return several errors for one GraphQL request #1013

Closed lenaorobei closed 5 years ago

lenaorobei commented 5 years ago

Example:

$e = new GraphQlInputException(__('Address validation error'));
/** @var \Magento\Framework\Phrase $error */
foreach ($errors as $error) {
    $e->addError(new GraphQlInputException(__($error)));
}
throw $e;
magento-engcom-team commented 5 years ago

Hi @sidolov, thank you for the review. ENGCOM-6118 has been created to process this Pull Request :eight_spoked_asterisk: @sidolov, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests
TomashKhamlai commented 5 years ago

@lenaorobei, could you provide a case where it is possible to test it? I had hopes on #961, but it is fixed now. I just wanted to verify that both data and errors arrays are present in the response body.

ghost commented 5 years ago

Hi @lenaorobei, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.