Clarification on Replacing tRPC with `HttpApi` or `Rpc` in Effect Typescript Library

I think I get it now. If you are trying to replace tRPC in your app, and you want to keep using REST, use HttpApi, don't use Rpc. If you are wanting to switch off of REST to web sockets or support lots of transports, maybe internal web sockets with external REST Api, use Rpc. Guess naming things is hard.

In summary, if you are trying to switch off of tRPC for your app, just use HttpApi.

Using a custom runtime with `toWebHandler` and sharing a cache across requests can be a bit trick...
Was this page helpful?