diff --git a/src/server/impl/registration_impl.ts b/src/server/impl/registration_impl.ts index ec4896b..0063350 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 4b1c05e..ff23665 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. */