GraphReFlyTS

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

ParameterTypeDescription
maxAttemptsunknownTotal attempts including the first try.
backoffBackoffPolicyBackoff strategy used between attempts.

Returns

A frozen retry policy record.

Example

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

Source

packages/ts/src/graph/resilience.ts