Skip to content
PACKAGES

retryPolicy()

Build an immutable retry policy.

import { retryPolicy } from "@graphrefly/ts/graph";
function retryPolicy(
maxAttempts = 1,
backoff: BackoffPolicy = noBackoff,
): RetryPolicy
ParameterTypeDescription
maxAttemptsunknownTotal attempts including the first try.
backoffBackoffPolicyBackoff strategy used between attempts.

A frozen retry policy record.

retryPolicy(3, { kind: "constant", delayMs: 250 });

packages/ts/src/graph/resilience.ts