Bundle mutations and rollback in case of error

When adding data in complex schemas, often you have side-effects that have to be accounted for.
This means that one mutation is often followed by several others. If one of these mutations fail, currently the client has to check every mutation for errors and roll-back all previous ones.

It would be great if mutations could be bundled instead and rolled back automatically if an error occurs on one of them.

What do you think?

Hi @maaft ,

Yes, this feature of combining mutations in a single transaction has been requested before. We have an RFC for this over here, Transactions in GraphQL . This is also a part of our roadmap and we plan on implementing this in coming months.

1 Like