You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement optimistic updates for batch methods inside client/data/plugins/use-update-schedules-mutation.ts
There's two places where we can update the queryClient cache:
onMutate: here we can set the data to what we expect it to be
onSettled: here we have the return data from each call as an array containing { siteSlug, response, error }. We can remove the errored entries here. Afterwards we invalidate multisite-schedules-update, which should then update to the same value we just set (if we nail it).
The text was updated successfully, but these errors were encountered:
❗Needs this merged first: #89902
Implement optimistic updates for batch methods inside
client/data/plugins/use-update-schedules-mutation.ts
There's two places where we can update the queryClient cache:
onMutate
: here we can set the data to what we expect it to beonSettled
: here we have the return data from each call as an array containing{ siteSlug, response, error }
. We can remove the errored entries here. Afterwards we invalidatemultisite-schedules-update
, which should then update to the same value we just set (if we nail it).The text was updated successfully, but these errors were encountered: