Using `HttpServerResponse` with tRPC and Express in Effect
So I was using trpc + express, and decided to migrate to Effect.
However, I still need to keep trpc.
I'm basically using the runtime inside the handlers in each trpc mutation/query. This works great to pass down the dependencies and keep logic in the effect world.
Now, I want to set some cookies.
Here's how I'm doing it:
Because the handler is trpc/express, I can't really just return an
However, note that I can create a
Any solutions to using
However, I still need to keep trpc.
I'm basically using the runtime inside the handlers in each trpc mutation/query. This works great to pass down the dependencies and keep logic in the effect world.
Now, I want to set some cookies.
Here's how I'm doing it:
Because the handler is trpc/express, I can't really just return an
HttpServerResponse.However, note that I can create a
HttpServerRequest with .fromWeb and that works great (I inject it into the runtime so the handlers can use it).Any solutions to using
HttpServerResponse here?