Closed pdohogne-magento closed 2 years ago
Here's the article where this strategy for handling error results came from explaining why it's a helpful approach: https://blog.logrocket.com/handling-graphql-errors-like-a-champ-with-unions-and-interfaces/
@aniham @jimbo @eug123 @cpartica @cspruiell @amolina-magento @keharper @abrhim @prabhuram93
This proposal has been updated according to continued conversation. Please re-review when available.
The intent is for this to be the pattern for error reporting in new additions to the schema going forward.
Re-approved
PWA-1611: Adding the ability to report partial successes on batch operations in Negotiable Quote
Problem
Some batch mutations in the Negotiable Quote module can have partial successes where some of the items succeed and some fail. This needs to be reported in a usable way.
Solution
Add a tri-state result status field to these operations with a
SUCCESS
,FAILURE
, andPARTIAL_SUCCESS
enum, and include an array result field that reports either a success or a typed failure for each item specified in the batch.Requested Reviewers