Is it possible to dynamically change the url of httpBatchLink in runtime?

I need to do it because I have 2 domians that share the same NextJS project and I need to be able to point tRPC to the right domain depending on the one the user is currently browsing from
AutumnLight
AutumnLight374d ago
Im a trpc noob but cant you just host both of them on different ports? also are the code bases of both projects merged or seperate? and is the backend combined or seperated? @FearlessSlug
fearlessslug
fearlessslug374d ago
Everything is combined, I do mild changes between each website which I'm currently detecting by the hostname in the 13.4 api routes
AutumnLight
AutumnLight374d ago
@FearlessSlug wait so both backends are also combined? are there some shared backend methods if not what you could do is have a prefix like /page 1 everything /page 2 everything it would be liek /myWebsite/users/create and /yourwebsite/users/create but tbh id seperate both apps
fearlessslug
fearlessslug374d ago
Thanks that's probably gonna work
More Posts
getting manually a subdomainFor some reason I can fetch here the route /test, but not /tester/eAbility to perform a tRPC request form a terminal, curl-likeHey, I wanted to ask if there is conventional a way to do that? I wanted to warmup my lambda but canUsage of useQuery after pageload?Hi all! I am new to TRPC so my apologies in advance for a very nooby question: In my [id].tsx file ISecurity question about tRCPIf I export the tRCP router as type in order to import that type in my client JS, wouldn't it mean tReal-world Large Application Examples?Are there any OSS examples (besides cal.com) demonstrating large tRPC code bases? I want to see howScaling tRPCI’ve been seeing issues regarding tRPC routers and performance issues as routers grow. I’m wonderinwhat is the best way to update trpc and its dependencies?Hi all, as the title says, how can i best update trpc and its dependencies? TRPC stands at 10.25.1,Where i can read a journal about tRPC ?I use tRPC for my Final Task in my Bachelor Degree, but i can't found journal about tRPC. Can anyoneDefault Query Function to resume paused mutationsI'm building a React Native App with an offline mode. I implemented a PersistQueryProvider and a buiSuperJSON is wrapping results in type with keys "json" and "meta"How can I modify the transformer in SuperJSON library to only return the "json" property and ignore Caching(?) previous data until query returns new datawhen I update my useQuery inputs with new filters it instantly sets the data to `undefined` while thHow to upload file not use S3 Next js? Please, examplefile: course.router.ts / import { CourseSchema } from "~/schema/post.schema"; import { createTRPChow can i send a request to specific route in trpc server, after mutation ?i am using trpc with next js ,Help in deploymentHey all, I am building an app which is having a 1 . vite-react frontend 2 . trpc-standalone how to persist the query client?I want to persist the trpc query client cache, but don't want to create a new query client, I want tHow to infer type of a nested object from app router output?I have a tRPC router than returns a nested object through a db query. It looks like this: ```ts ILeWhat's the type of errorFormatter parameterI wanna know how could i get the type of the errorFormatter parameter, so i can move the errorFormattRPC works only for monoliths environment?How can I works if typesafe in real time with a remote server? 🤔How to use createCaller() with lambda for testing?Has anyone successfully mocked a trpc caller that uses the AWS Lambda integration? trying to write sis there a way to call useQuery() from a callback and get the return value within that callback?I have a generic component that is effectively an autocomplete that fills in options from a web requ