Skip to content

Graphorin API reference v0.15.1


Graphorin API reference / @graphorin/core / / requestApproval

Function: requestApproval()

ts
function requestApproval<TDecision>(
   name, 
   payload?, 
   options?): TDecision;

Defined in: packages/core/src/channels/durable.ts:273

Stable

Suspend on a named persisted approval. Resolved by workflow.approve(threadId, name, decision); the decision is returned here. The optional payload is surfaced on the pending pause record so an approval UI can show what is being approved. With options.timeoutAt the approval also carries a durable deadline - see RequestApprovalOptions.

Type Parameters

Type ParameterDefault type
TDecisionunknown

Parameters

ParameterType
namestring
payload?unknown
options?RequestApprovalOptions

Returns

TDecision