Seeking Middleware Solutions for RPC Router: Context Injection and Request/Response Interception
not sure if this is the right channel for a rpc question but is there a way to add some kind of shared middleware to an rpc router
basically I would like to do two things on a router by router basis 1. inject some new context based on existing context effectfully (this is possible right now with
provideServiceEffect
provideServiceEffect
2. the ability to intercept the rpc level request/response - i dont believe this is possible right now
basically I have a couple related rpcs that all have to do the same authentication check and otherwise fail with the same
AuthError
AuthError
which is a part of all of the rpcs error schemas
right now I just execute a
authenticate
authenticate
effect that fails with an auth error at the top of each effect but I feel like there has to be a better way