Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rpc doesn't account for metadata #1028

Open
fizx opened this issue Apr 12, 2024 · 2 comments
Open

Rpc doesn't account for metadata #1028

fizx opened this issue Apr 12, 2024 · 2 comments

Comments

@fizx
Copy link
Collaborator

fizx commented Apr 12, 2024

interface Rpc {
  request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
}

There's an option to include a metadata?: Metadata arg, but only under certain providers. There's also no option to receive Metadata from the response.

This seems like a pretty wide-ranging potential change. Have people run into this problem before?

@stephenh stephenh removed their assignment Apr 13, 2024
@stephenh
Copy link
Owner

I think most users have used metadata on the server, i.e. to accept incoming data like auth headers.

Also I think that its the client Rpc implementations that put this metadata on the wire, and not the individual call sites that are calling SomeService.someMethod.

If you needed to pass per-callsite metadata into a await someService.someMethod(...) call, and have that passed through the Rpc interface, then yeah we do not support that atm.

Do you need to do that? Or can you follow the ^ pattern and have the Rpc implementation generically put the same auth/user metadata on the wire for all calls?

@fizx
Copy link
Collaborator Author

fizx commented Apr 13, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants