Effect CommunityEC
Effect Community•10mo ago•
42 replies
garrett

Understanding Requirements for RPC Middleware in Effect Typescript

Can RPC middleware have no requirements? I assume so since the type is

export interface RpcMiddleware<Provides, E> {
  (options: {
    readonly rpc: Rpc.AnyWithProps
    readonly payload: unknown
    readonly headers: Headers
  }): Effect.Effect<Provides, E>
}


What is the reason for this? And how would one be expected to, for example, check a db for a session?
Was this page helpful?