T
tRPC

❓-help

Calling a tRPC service from another tRPC service

MMcPizza9/4/2023
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
MMcPizza9/4/2023
Ended up creating trpc client in the backend, importing and using it within App1 procedures Works ok, had some funkiness with fetch Good enough
Ssachin9/6/2023
yeah your solution sounds best

Looking for more? Join the community!