Nick
Nick12mo ago

tRPC 10 Mutations Firing Twice in Deployed Releases Only

We have a newly-upgraded tRPC 10 / ReactQuery 4 app and on two pages on which we have a lot of mutations, the mutations are firing twice on click. This is not happening on other pages of our app. This is not a case of double-click, we are already disabling the buttons on mutation commencement This does not happen in local development; this only happens on Vercel preview deployments / prod deployments.
1 Reply
Nick
Nick12mo ago
ah was missing an await in a middleware call... when a middleware authorized function was firing inside a middleware without await on it, the operation would call again when that middleware finished. this was a next issue rather than a trpc issue,c losing