Ryan
Modify the payload before mutating
I wouldn't be losing type safety necessarily, cause the items that I want to add in preprocessing are all optional items, so mutate would still infer its original payload type
This is what I ended up doing.. not sure I like it though, also not 100% sure what the impications of using the ProxyClient is on the cache, if any.
9 replies
Modify the payload before mutating
I have a hook wrapped around this specific useMutation that is called from a few different places in my app. I need it to pass some UTM params stored in my local storage along with the payload, but don't want to have to remember to always include the params when I call the mutation. Ideally in the hook (within the mutate fn) I can add the utms
9 replies
Can you return from an API endpoint before a sync operation is complete?
I've never used this service before, so not a recommendation, but I came across this product that has a Vercel integration that maybe you could use @Tom3
https://vercel.com/integrations/serverlessq
34 replies
Can you return from an API endpoint before a sync operation is complete?
Agreed, it's more so small cleanup things that I wanted to do, like after a user has claimed x delete it from the DB in a second call that doesn't effect what the user sees. But as most of these won't add significant time I will probably just await them for now until I have time to setup a job queue
34 replies