T
TanStack9mo ago
provincial-silver

Usage with trpc

Hey there, I guess this question could apply to all of the query implementations. I'm using angular query with trpc and was wondering if I can conveniently extract the errorShape from my procedure type. TRPC already has a procedure.errorShape property that carries the information. Secondly you have procedure.query() as the async query function. I wonder if it is possible to implement something like injectTrpcQuery that would have the client already and mainly provide a way to select the respective procedure. It could then infer the error and call the query function with just the query key, which would have to have the shape of the input I guess. I'm not sure yet how this would work with paginated queries. I'll go ahead and try to write this funciton but would be very glad for pointers or input.
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?