creating middleware with context type as param
i'm looking into build a "post operation" function into separate piece of code. i know it may be done differently but i'm looking into it for code structure purpose. the goal of the middleware is to accept a function which takes the current context as input, as well as the result from the handler, and execute code.
my problems are:
my problems are:
- i have no idea how to get the
C(context) type right - the
MiddlewareResult<>type is not exposed from@trpc/serverso i can't pull it.
- can it be done?
- how difficult it should be?
- somebody has pointer on it? help please
