You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@habovh Although I know updating to Apollo Client 3 might not be an easy option, a lot has changed about the way optimistic mutation results work since AC2, so there's a good chance the ultimate answer to this issue is to upgrade to AC3.
Instead of migrating your whole app just to see if this problem goes away, do you think you could try reproducing the problem using this AC3 template? If it's not reproducible with AC3, that's good, and I hope that gives you another reason to upgrade. If the problem is still reproducible with AC3, that would also be great to know, so we can fix it properly.
Indeed updating to AC3 seems like a good idea, we're currently holding it back for compatibility reasons with a third-party link provider, but will surely come to it at some point.
Simply build the app and try to add a person. You'll see the person's name appearing directly in the list thanks to the optimistic response. But once the "actual server" responds —I've increased the fake server delay to 2000ms—, while you'll see no error on screen, the added name disappears, meaning the optimistic response got rolled back, despite the link explicitly removing any errors.
Intended outcome:
Optimistic response should not roll back in case of an error that is being ignored by the
onError
link.Actual outcome:
Optimistic response gets rolled back even though the mutation errors are being ignored by
onError
link.How to reproduce the issue:
onError
link to ignore errors from said mutation (e.g usingoperation.operationName
to identify the mutation)Versions
The text was updated successfully, but these errors were encountered: