TanStackT
TanStack2mo ago
1 reply
faint-white

is there a way to know if there are any async mutations in-flight for a collection?

I want to block mutations in the brief period that an async mutation is in-flight for one of my larger forms. It's mainly to prevent the race condition where an onUpdate handler gets processed before the onInsert.

In this case, an upsert is not possible, the insert '''must''' happen before the update.

Is there a way to access like a pendingMutations integer or a isMutating flag for a collection ? This would tremendously help in my opinion

thank you in advance
Was this page helpful?