"Nesting" mutations?
useUpdate which does a mutation and invalidates some queries in the onSuccess.I've got another
useArchive which is really just an update, and should do the same invalidations as useUpdate, but then also a few more things (like some other invalidations) in its own onSuccess.But then I've got a third
Sidebar component, which uses useArchive in an event handler, and then has its own onSuccess logic (e.g., close the sidebar).Is there anything particularly wrong with defining a "nested" mutation? Something like: