child router question
let's say we have a monorepo, one server, two client apps (cat and dog). we make one appRouter, like:
export const appRouter = t.router({
cat: catRouter,
dog: dogRouter
})
export type CatRouter = typeof catRouter;
export type DogRouter = typeof dogRouter;
the cat app should only know about cat routes, dog app only about dog routes by importing the right type.
the server will listen for /cat.getCatFood and /dog.getBone. either i want to change the dot to a forward slash so i can simply tell cat app the baseurl is <url>/cat OR tell client, hey, baseUrl is <url> but, you should prefix all calls with "cat."
are either possible?
N
Nick•325d ago
Not currently possible, and it would break batching if you did it.
There is an open issue/pr to support this but IIRC it stalled
4.8KMembers
View on DiscordMore Posts
How to force SSL on projects using tRPC?Hello everyone,
I'm working on a project that uses create-t3-app as boilerplate. My project is hosAWS Lambda / How to set Cookies inside ProceduresHow can I set and remove cookies similar to ctx.res.cookie(..) with Express when using the aws lambdMassive Type Errors on tRPC 10 Legacy Router against MergeRouterWe're trying to upgrade to tRPC 10 but I am running into a massive type clash when trying to merge rIs it possible to create 2 routers inside a single file?I am having an issue in which it is impossible to me to use a class instance within 2 routers. I triUse onError to change an application error into a TRPCError?I want to use the onError handler to change any instance of a custom application error into a TRPCErIncreasing Body 1mb limitHey, Im trying to build an application that allows sending of base64 encoded files to my next.js serNitro and tRPC in vercel-edgeHey there! I hope this is the right place to ask for help.
I am trying to deploy an application witHow to retrieve and receive Bigint data to/from TRPC procedureNode: `v16.15.1`
I'm trying to return an object which contains an `amount` property from one of my