Get the type of context after middleware
How can I get the type of the context of
adminProcedure
from
export const adminProcedure = publicProcedure.use(isAdmin)
?
https://trpc.io/docs/server/middlewaresMiddlewares | tRPC
You are able to add middleware(s) to a procedure with the t.procedure.use() method. The middleware(s) will wrap the invocation of the procedure and must pass through its return value.
4.8KMembers
View on DiscordMore Posts
[How To] Properly use trpc UseQuery based on currently selected itemI have a component with a video element and a flatlist. I want to utilize a trpc query to get the viData from useQuery is inferred as data: {} | undefinedMy server query returns data from database via ElectroDB. TypeScript can statically infer all proper