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
For gRPC-servers, we generate service interfaces like this and service definitions like this.
The interface, your implementation and the service definition are intended to be used with the official gRPC package for node.js, wich is well maintained, written in type script and feature complete as far as I'm aware. I am pretty sure the package supports server side interceptors as well, but I do not actually know how at the top of my head. I'm happy to take a code snippet or PR to add to the example.
There is an alternative way to implement gRPC servers. The idea is to generate interfaces that do not depend on a specific type of transport, so that you could provide a single service implementation via gRPC, Twirp, etc. without additional implementation work. This is tracked in #56 and in alpha status. Example for such a generic service, served with a @grpc-js server, see here. You would add interceptors the same way as above.
I couldn't find any server side interceptors, neither in the listing of features nor in the code itself. And as I mentioned earlier, it looks like it isn't in the priorities for now.
Currently ended up with wrapping the implementation with JS proxy and putting all the interception logic inside.
But wanted to validate there's no workaround in protobuf-ts land.
Is there one or any plans to have?
couldn't find anything in docs/examples.
PS
grpc-js
doesn't support itThe text was updated successfully, but these errors were encountered: