Finn
How to properly handle Prima selects/includes with tRPC?
So, my question basically is, how you usually do this. Do you just allow all strings to be passed and try-catch possible errors being thrown, or am I severly misunderstanding how to use tRPC.
8 replies
Using tRPC in Next.js Middleware
Well, the cookies are missing in the request to the API for me as well - if that's what you mean. That's why I just read the cookie in the middleware and pass it into the api call, rather than reading the cookie within the procedure itself.
16 replies
Using tRPC in Next.js Middleware
I think that you should better create a new thread for that, if you're having problems with your code. I am very much not qualified to give any advice on tRPC whatsoever. I just took a quick look at the
create-t3-app
template and went on with it. The configuration of tRPC is a myth to me.
Sorry mate.16 replies
Using tRPC in Next.js Middleware
Hi,
I don't recall needing to change anything for it to work. But its been some time. I gave up trying to create my own authentication system and just started using lucia auth.
Right now I use this
api
to validate requests in middleware.ts
But I still don't like that I have 3 different api
s, for react, server and edge runtime. But I really don't have any clue as to what I could change for it to work otherwise.16 replies
Using tRPC in Next.js Middleware
For reference, the whole template can be found here: https://github.com/t3-oss/create-t3-app/tree/main/cli/template/extras/src/trpc
16 replies