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:
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:
- Is it possible to abort a streaming mutation client-side with a react trpc client?
- if yes, can this be done using the old syntax? or if we need to use the new syntax, what code for the
useTRPChook makes the types check out?