Atomic blocks

Options
Hey! 
When I have a sequence of queries for an endpoint(5 queries for example),  when the third query fails and then the request fails, I would want the first and the second queries to be rollbacked to their initial values like for atomic blocks with sql.
Is that available? If it is, how can I setup it up. If it is not, can you please provide any workaround solution ?
Thanks

Comments