Data consistency for multiple & connected REST api calls?

Hello all.

Could anyone here help me with the following question (in the context of REST api calls):
e.g. I save a parse object and update the count (which is stored as a separate parse object) in afterSave method. What happens if the saving of the object succeeds but the update of the count fails?
How is data consistency ensured in such cases?


Iā€™d try to ensure an atomic operation by sending a batch request with both operations together and the flag transaction: true

1 Like

Is there any doc or example of transaction: true?

Not yet. But you can see some examples in the test cases:

1 Like

Thanks for replying :+1: