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