Skip to content

Graphorin API reference v0.15.1


Graphorin API reference / @graphorin/workflow / / awaitExternal

Function: awaitExternal()

ts
function awaitExternal<TResume>(name, options?): TResume;

Defined in: packages/core/dist/channels/durable.d.ts

Stable

Suspend on a named durable promise. The thread stays suspended (and survives restarts) until an external caller resolves it via workflow.resolveAwakeable(threadId, name, value); that value is returned here. With options.schema the value is validated on delivery - see AwakeablePayloadError for the rejection semantics.

Type Parameters

Type ParameterDefault type
TResumeunknown

Parameters

ParameterType
namestring
options?AwaitExternalOptions&lt;TResume&gt;

Returns

TResume