question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add ability to set grpc-js MetadataOptions when using GrpcTransport

See original GitHub issue

When 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:open
  • Created a year ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
kskalskicommented, Apr 19, 2022

grpcweb-transport doesn’t use grpc-js, so it doesn’t consume its MetadataOptions. One could imagine some of the functionalities from those options to be implemented in grpcweb-transport, but that is an independent feature.

0reactions
Janaka-Stephcommented, Apr 19, 2022

Does grpcweb-transport affected by the same issue?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found