trying to access req and res in trpc query
I need to access res to set a header.
I tried accessing req and res from ctx but only session and prisma are available.
Any ideas? I tried looking it up but didn't really get anywhere
6 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I did try that tbh
but very briefly
I took an example from the t3 docs
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
I can definitely take another crack at it
looks solid don’t think I saw this thanks!
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
yeah I will thanks
worked ty!, had to modify the CreateContextOptions type too, adding the req and res there
.close