Add ability to set grpc-js MetadataOptions when using GrpcTransport
See original GitHub issueWhen grpc-js calls are made, it’s possible to set Metadata
, which besides key-value pairs, also contains a few pre-defined options set in constructor with MetadataOptions
object ).
Currently the generated rpc clients in protobuf-ts take RpcOptions
object, which contains meta: RpcMetadata
, but this option doesn’t seem to support populating the same options as in MetadataOptions
when call is made using GrpcTransport
.
I suppose GrpcMetadata
object could be added to grpc-transport
package, which would extend RpcMetadata
and calls using grpc transport could translate them to fully populate Metadata
. I’m not sure if this translation could be done in a type-safe way - this would probably require baking in some extensibility into generic client.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Core concepts, architecture and lifecycle - gRPC
An introduction to key gRPC concepts, with an overview of gRPC architecture and RPC life cycle. ... It is possible to use other...
Read more >How to use the @grpc/grpc-js.Metadata function in ... - Snyk
To help you get started, we've selected a few @grpc/grpc-js.Metadata examples, based on popular ways it is used in public projects.
Read more >gRPC - Microservices - A progressive Node.js framework
gRPC is a modern, open source, high performance RPC framework that can run in any environment. It can efficiently connect services in and...
Read more >Cannot Compose Insecure Credentials · Issue #543 - GitHub
I'd simply like to be able to compose insecure credentials with call ... const metadataUpdater = (_, cb) => { const metadata =...
Read more >Interacting with the Node - Cosmos SDK Documentation
// Create a connection to the gRPC server. ... "127.0.0.1:9090", // your gRPC server address. grpc.WithInsecure(), // The Cosmos SDK doesn't support any...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
grpcweb-transport
doesn’t usegrpc-js
, so it doesn’t consume itsMetadataOptions
. One could imagine some of the functionalities from those options to be implemented ingrpcweb-transport
, but that is an independent feature.Does grpcweb-transport affected by the same issue?