t
tRPC
t
tRPC
Merge more than 19 router
Original message was deleted
tRPC
Join
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,111
Members
View on Discord
N
Nick
•
2/9/23, 4:28 PM
https://trpc.io/docs/merging-routers
Merging Routers | tRPC
Writing all API
-code in your code in the same file is not a great idea
. It
's easy to merge routers with other routers
.
N
Nick
•
2/10/23, 8:04 AM
It returns a new router so you can always pass that router back to mergeRouters for more if there
’s really a limitation
N
Nick
•
2/10/23, 8:06 AM
If you
’re trying to merge this much stuff though I
’d be questioning your use case
. Most people would use the first method documented on that page to structure their API
, not having a single router with 100s of procedures on