Skip to content

Add support for context values #521

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

Closed
wants to merge 5 commits into from

Conversation

paul-sachs
Copy link
Collaborator

@paul-sachs paul-sachs commented Feb 27, 2025

This change adds passing through a serializable version of context values. Note that this does not provide a way to create a reactive version of context values, and just provides the building blocks in order to allow passing context values to the underlying RPCs and ensuring that the context values can be serialized in a way to allow a reactive version.

Fixes #516

What's left:
- More testing
- Figuring out an initial reactivity model

Signed-off-by: Paul Sachs <psachs@buf.build>
To be added in it's own PR

Signed-off-by: Paul Sachs <psachs@buf.build>
Signed-off-by: Paul Sachs <psachs@buf.build>
Signed-off-by: Paul Sachs <psachs@buf.build>
Signed-off-by: Paul Sachs <psachs@buf.build>
@paul-sachs paul-sachs marked this pull request as ready for review February 27, 2025 19:00
@paul-sachs
Copy link
Collaborator Author

paul-sachs commented May 5, 2025

Closing this for now. Passing context values in a dynamic way has a number of ways that are unpredictable. If you need to set context values, create a custom transport with an interceptor that sets the value and use addStaticKeyToTransport to bind that context value to a query.

@paul-sachs paul-sachs closed this May 5, 2025
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

Successfully merging this pull request may close these issues.

Ability to pass CallOptions
1 participant