Interface: WorkflowHandle<T>
A handle to a running workflow that is returned by the startWorkflow helper. This handle should be returned by WorkflowRunOperationStartHandler implementations.
The type parameter T carries the workflow's result type for downstream type inference in
WorkflowRunOperationHandler. It is encoded in the workflowResultType brand so
that WorkflowHandle<string> and WorkflowHandle<number> are structurally distinct.
Extended by
Type Parameters
T
T
Properties
runId?
readonlyoptionalrunId?:string
workflowId
readonlyworkflowId:string
Methods
query()
query<
Ret,Args>(def, ...args):Promise<Ret>
Queries the Workflow as part of this Nexus Operation.
A Query resolves immediately and writes nothing to history, so this backs a synchronous operation: there is no operation token and nothing to cancel. The link the server returns for the Workflow that processed the Query is attached to the operation's outbound links, so the caller's NexusOperation history event points back at that Workflow.
Type Parameters
Ret
Ret
Args
Args extends any[] = []
Parameters
def
string | QueryDefinition<Ret, Args, string>
args
...Args
Returns
Promise<Ret>
signal()
signal<
Args,Name>(def, ...args):Promise<void>
Type Parameters
Args
Args extends any[] = []
Name
Name extends string = string
Parameters
def
string | SignalDefinition<Args, Name>
args
...Args
Returns
Promise<void>