Is it possible to change how TRPC maps routers to URL paths?
Hello there,
in my current project I would like to map merged routers to subpaths in the url. For example, there is one router to handle auth-related api calls and another one for project settings. At the moment, when I merge both routers into a "root" router, the procedures are available under e.g.
/auth.signup
or /project.create
.
This is perfectly fine until I merge two routers that each merge more routers. Then it becomes e.g. /auth.signup.verify
. As I am building an API that should be usable by external users (not only my own frontend), I would prefer it to be /auth/signup.verify
to prevent confusion. Is there an option to achieve this result?Solution:Jump to solution
I noticed that this would make batching unusable and therefore expect it not to be possible.
1 Reply
Solution
I noticed that this would make batching unusable and therefore expect it not to be possible.