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
Describe the bug
As a dev, I should be able to fail in a conflict resolver and have that failure come back as an onFailure callback in GraphQL.Callback with a special code telling me the failure was do to a conflict.
To Reproduce
Steps to reproduce the behavior:
Create a mutation in AppSync that will conditionally update based on expectedVersion. (i.e. there is a template for this)
Execute the mutation on Android client using enqueue with GraphQL.Callback using an object in with an older version number.
A conflict occurs on the AppSync backend as expected and and my custom ConflictResolver is invoked on the client.
I fail the conflict.
GraphQL.Callback is never called back. I have no way of telling my UI to stop waiting.
Expected behavior
GraphQL.Callback should be called back in a ConflictResolver failure scenario.
Environment(please complete the following information):
AppSync SDK Version: 2.6.26
Device Information (please complete the following information):
Device: Pixel XL API 28 Simulator
The text was updated successfully, but these errors were encountered:
@mmarceau
Version 2.7.5 of the SDK contains changes to address this issue. The callback will be called if you fail a mutation in the conflict resolver code.
In the onFailure, you can check if the exception is an instance of ConflictResolutionFailedException to know that the failure was due to a conflict. See the following test for an example
@mmarceau
Good to hear. I will go ahead and close out this issue. Please feel free to post back here ( or create a new issue) if you run into problems.
Describe the bug
As a dev, I should be able to fail in a conflict resolver and have that failure come back as an onFailure callback in GraphQL.Callback with a special code telling me the failure was do to a conflict.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
GraphQL.Callback should be called back in a ConflictResolver failure scenario.
Environment(please complete the following information):
Device Information (please complete the following information):
The text was updated successfully, but these errors were encountered: