t
tRPC
Nested tRPC procedures. - tRPC
D
tRPC
•
2y ago
•
15 replies
Deepak Sharma
Nested tRPC procedures.
I
'm trying to convert a REST API structure to tRPC
. Specifically
, I want to replicate the nested REST route
products/:productId/discount
products/:productId/discount
in tRPC
?
?
. How should I declare and organize these nested routes in tRPC to match this structure effectively
?
Solution
there is no reason for the nesting here because you only have one procedure inside the nested routers
Jump to solution
tRPC
Join
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
4,951
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Auth through trpc procedures
M
Mar / ❓-help
3y ago
Calling Express `request.send` inside tRPC middleware/procedures
S
skylerdj / ❓-help
2y ago
AppRouter nested routers/procedures are any when imported in monorepo
E
Eilinis / ❓-help
13mo ago
Procedures with paramters.
B
brumbrum_brum / ❓-help
2y ago