retryPolicy()
Build an immutable retry policy.
Import
Section titled “Import”import { retryPolicy } from "@graphrefly/ts/graph";Signature
Section titled “Signature”function retryPolicy( maxAttempts = 1, backoff: BackoffPolicy = noBackoff,): RetryPolicyParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
maxAttempts | unknown | Total attempts including the first try. |
backoff | BackoffPolicy | Backoff strategy used between attempts. |
Returns
Section titled “Returns”A frozen retry policy record.
Example
Section titled “Example”retryPolicy(3, { kind: "constant", delayMs: 250 });Source
Section titled “Source”packages/ts/src/graph/resilience.ts