infodusha
Hot to redirect in middleware when using createCallerFactory
Since next 15 came out and it has it's own error handling function, the solution I had before (custom webpack plugin) had to be thrown away, so I had this question again
And now here is a solution:
13 replies
Using tRPC (createCallerFactory) with react-query.
Ahh I see now. So you kinda want to use trpc as a data layer but on the client...
And you still want to use react-query integration because under the hood this "data layer" still make requests, am I right?
8 replies
Using tRPC (createCallerFactory) with react-query.
Hello. What do you expect from this approach?
The error comes from a thing,
createCallerFactory
is a server method, not a client method. It totally makes no sese to provide server code in the client provider.8 replies
Hot to redirect in middleware when using createCallerFactory
A have also tried
to preted that is TRPC error but aparently it is not thrown but just logged.
Now the only solution seems to we wrapping the call in api that will allow to throw outside of caller factory (sounds like making a proxy object or so)
13 replies
Hot to redirect in middleware when using createCallerFactory
Also it seems to be related to https://discord.com/channels/867764511159091230/1096053768170258515/1096053768170258515
13 replies