T
TanStack•3y ago
rare-sapphire

Multiple mutations, one notification

Hello World! Imagine you have to do 3 mutations (they are not dependent on each other) and you have to display only one success notification if all mutations were OK, and one error notification specifying which mutation failed. Any idea? Thanks in advance. 🙂 (TanStack Query v4 for React)
1 Reply
rare-sapphire
rare-sapphireOP•3y ago
I did it with mutateAsync, Promise.allSettled and then Array.prototype.some to check if any was rejected. Please, if you find any other better solution, share it. 🙂

Did you find this page helpful?