Using tRPC to connect to two different apis
I have a create-t3-app where I am using tRPC for the api. It works great but I need to run a separate server for some long-running tasks (which won't fit on vercel) and I want to use trpc for that too. I created a separate createTRPCNext for it, and in _app.tsx I have:
The problem is that tRPC only looks at the inner context no matter which api I use in my code, and requests are sent to it. Is there a way to have the 2 contexts not get confused by tRPC?
3 Replies