Skip to content

feat: add RpcWithContext for context-aware RPC calls#76

Open
yash-2523 wants to merge 1 commit intosupabase-community:mainfrom
yash-2523:feat/add-rpc-context
Open

feat: add RpcWithContext for context-aware RPC calls#76
yash-2523 wants to merge 1 commit intosupabase-community:mainfrom
yash-2523:feat/add-rpc-context

Conversation

@yash-2523
Copy link

What kind of change does this PR introduce?

feature

What is the current behavior?

RPC calls do not allow passing a context.Context, so callers cannot set timeouts, deadlines, or cancel in-flight RPC requests.
Related issue: #63

What is the new behavior?

Adds a context-aware RPC execution method (RpcWithContext) that allows callers to pass a context for cancellation and timeouts. Existing RpcWithError behavior is preserved by defaulting to context.Background().

Additional context

This follows the same pattern introduced in #49 for query execution. Includes a test to ensure canceled contexts fail immediately.

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.

1 participant