McPizza
McPizza2y ago

Calling a tRPC service from another tRPC service

I have 2 services (App1 and Service2) App1 is client facing and uses trpc well But occasionally App1 backend needs to call a procedure on Service2 Should I just use the vanilla client on App1 backend and import types/context from Service2? p.s. this is not Next ecosystem
2 Replies
McPizza
McPizzaOP2y ago
Ended up creating trpc client in the backend, importing and using it within App1 procedures Works ok, had some funkiness with fetch Good enough
sachin
sachin2y ago
yeah your solution sounds best

Did you find this page helpful?