This PR reorders the switch that produced the result('data) returned by the mutate function, so that the promise resolves to Error when when error is non-null and data is either, whereas the previous version only resolves to Error when data is null.
This make the behaviour consistent with the controlledVariantResult('data).
This PR reorders the switch that produced the
result('data)
returned by themutate
function, so that the promise resolves toError
when when error is non-null and data is either, whereas the previous version only resolves toError
when data is null.This make the behaviour consistent with the
controlledVariantResult('data)
.