-
Hi, I am trying to achieve the following: calling a mutation with optimistic update without actually sending the mutation to the server untill [ the user activity is idle ], so basically sending mutation to the server only once for multiple mutations calls in a while. To achieve this I've configured cacheExchange optimistic and added my custom exchange just before the fetchExchange. The custom mutation using wonka operators looks pretty much like this:
It works ok with only one event during the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
We simultaneously opened threads with very similar use cases 😄 (#1255) I've played a bit with an adaptation of this snippet from @kitten (Server | Client), it seems to kinda work with some caveats but I'm not entirely sure how... in particular:
|
Beta Was this translation helpful? Give feedback.
We simultaneously opened threads with very similar use cases 😄 (#1255)
I've played a bit with an adaptation of this snippet from @kitten (Server | Client), it seems to kinda work with some caveats but I'm not entirely sure how... in particular:
debounce
works - since all operations are evaluated into their own pipe (at least that's what I understood, otherwise I'd have expectedops$
to be provided withforward
andclient
, not as a separate callback argument), how come the debounce context is shared? Shouldn't one new context be created for each time theops$
function is called, thus turning the debounce into a kind of delay?