How to abort a streaming mutation
I have a streaming mutation working, but I need to be able to abort it. I've seen this thread but that syntax doesn't appear to be valid for the React version.
If I do this:
then I get the type error that
If I try the new tanstack-query client syntax (from this migration guide), well that also doesn't work because the property
That migration guide doesn't specify how the
So my main questions are:
1. Is it possible to abort a streaming mutation client-side with a react trpc client?
2. if yes, can this be done using the old syntax? or if we need to use the new syntax, what code for the
Thanks in advance!
If I do this:
then I get the type error that
'signal' does not exist on mutation options.If I try the new tanstack-query client syntax (from this migration guide), well that also doesn't work because the property
mutationOptions doesn't exist in this call:That migration guide doesn't specify how the
useTRPC custom hook is meant to be implemented, so I suspect there's something I'm missing there?So my main questions are:
1. Is it possible to abort a streaming mutation client-side with a react trpc client?
2. if yes, can this be done using the old syntax? or if we need to use the new syntax, what code for the
useTRPC hook makes the types check out?Thanks in advance!