Replies: 1 comment
-
Hi @nateiler, thanks for the question. You're right, at the moment there's no way to pass state between middleware functions and route handlers, but we're planning on adding an API very soon. We started having a discussion in this issue (see this comment), but I'm going to create a dedicated issue later today. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
One middleware we often introduce in a multi-tenant api is a transaction middleware which is responsible for extracting various parts of the request (mostly from the authorizer context) and providing a
Transaction
object to the route(s).With the introduction of middleware, what is the proposed approach for a middleware needing to modify the request context? In this particular scenario, I would like to attach a
transaction
property and have the typing available within the route.In general, it seem like any manipulations that occur within the middleware is unable to update the request context typing
Beta Was this translation helpful? Give feedback.
All reactions