From a8853de0bb56dcd7a9bb8766133596d29f93f537 Mon Sep 17 00:00:00 2001 From: Fern Sanchez Date: Thu, 13 Nov 2025 11:14:50 -0500 Subject: [PATCH] ferntheplant - include the requestId in the context for actions --- src/server/impl/registration_impl.ts | 2 ++ src/server/registration.ts | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/src/server/impl/registration_impl.ts b/src/server/impl/registration_impl.ts index ec4896b0..0063350a 100644 --- a/src/server/impl/registration_impl.ts +++ b/src/server/impl/registration_impl.ts @@ -355,6 +355,7 @@ async function invokeAction< const calls = setupActionCalls(requestId); const ctx = { ...calls, + requestId, auth: setupAuth(requestId), scheduler: setupActionScheduler(requestId), storage: setupStorageActionWriter(requestId), @@ -445,6 +446,7 @@ async function invokeHttpAction< const calls = setupActionCalls(requestId); const ctx = { ...calls, + requestId, auth: setupAuth(requestId), storage: setupStorageActionWriter(requestId), scheduler: setupActionScheduler(requestId), diff --git a/src/server/registration.ts b/src/server/registration.ts index 4b1c05ef..ff236659 100644 --- a/src/server/registration.ts +++ b/src/server/registration.ts @@ -230,6 +230,11 @@ export interface GenericActionCtx { ...args: OptionalRestArgs ): Promise>; + /** + * The request ID for the current function call. + */ + requestId: string; + /** * A utility for scheduling Convex functions to run in the future. */