t
tRPC
P
tRPC
•
3y ago
Patryk Makowski
Get the type of context after middleware
How can I get the type of the context of
adminProcedure
adminProcedure
from
export const adminProcedure = publicProcedure.use(isAdmin)
export const adminProcedure = publicProcedure.use(isAdmin)
?
https://trpc.io/docs/server/middlewares
Middlewares | 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
.
tRPC
Join
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
How to get the type of context after middleware context extension?
C
cha0sg0d / ❓-help
3y ago
Getting the type of context
T
Tribe / ❓-help
2y ago
Infer context from procedure after middleware
V
Vinnie / ❓-help
2y ago