You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When migrating an existing express/REST service to use connect/gRPC, it will be a typical scenario that an RPC handler must work with the existing express middleware. If we cannot access req.locals or res.locals, for some users adopting connect-es will be impossible.
Describe the solution you'd like
Please provide access to req/res.locals via the HandlerContext.
This request is for Connect for Node.js.
Describe alternatives you've considered
I would personally prefer, at least during beta, that the entire raw express req and res are exposed to us via HandlerContext. It's not clear to me how you all plan to address authentication/authorization or middleware generally, or how you intend to relate http middleware to gRPC interceptors. Until these are resolved it remains unclear how folks can migrate existing services or do serious work with connect-es.
The text was updated successfully, but these errors were encountered:
We nearly got our API migrated from grpc-js to connect-es. Everything went smoothly, but unfortunately we hit a wall with this (lack of access to res.locals). We hope this will be fixed, or that an alternative could be found. Server interceptors is not available in plain grpc-js, but at least a nice workaround is possible that gives access to a variable similar to res.locals (ctx). It doesn't seem possible to do the same with connect-es.
Is your feature request related to a problem? Please describe.
When migrating an existing express/REST service to use connect/gRPC, it will be a typical scenario that an RPC handler must work with the existing express middleware. If we cannot access req.locals or res.locals, for some users adopting connect-es will be impossible.
Describe the solution you'd like
Please provide access to req/res.locals via the HandlerContext.
This request is for Connect for Node.js.
Describe alternatives you've considered
I would personally prefer, at least during beta, that the entire raw express req and res are exposed to us via HandlerContext. It's not clear to me how you all plan to address authentication/authorization or middleware generally, or how you intend to relate http middleware to gRPC interceptors. Until these are resolved it remains unclear how folks can migrate existing services or do serious work with connect-es.
The text was updated successfully, but these errors were encountered: