Kylar
Explore posts from serversHow can i createCaller from a NextJs App Router if my server uses express tRPC adapter?
I'm using the express adapter for the server side of tRPC, and the client is a NextJS AppRouter app.
I was getting to setting up the createCaller helper to be able to call from RSC, but createCaller needs the context, which for the express adapter is the request and response objects.
The issue here is that I don't actually have the request/response objects in NextJS App router by design (https://nextjs.org/docs/app#how-can-i-access-the-request-object-in-a-layout), which leaves me unsure about how to move forward
Is tRPC unusable with this setup? Do I need a proxy adapter or is there some piece that I am missing?
8 replies