Comparing `Router.toHandlerEffect` to the New RPC Implementation in Effect Typescript
Is there anything comparable to
Similarly, on the client side, I used something like
I have been studying the
My call used to look something like this:
where
Router.toHandlerEffect in the new RPC implementation? I'd like to evaluate RPC requests just by passing the payload. I guess the point is that the platform this runs on handles the data transfer. It passes me the raw payload and expects the response payload back.Similarly, on the client side, I used something like
Resolver.toClient(Resolver.makeEffect((requests) => Effect.promise(() => platformProvidedCallToServer(requests))()) where I pass the RPC payload and expect the RPC response back.I have been studying the
RpcServer source, and it looks like I may need to implement a custom protocol. Am I going the right way with this, or am I overcomplicating things?My call used to look something like this:
where
request is of type (not a HTTP request):