Back to Apollo Client

Api Report Link Retry.Api

.api-reports/api-report-link_retry.api.md

3.14.11.6 KB
Original Source

API Report File for "@apollo/client"

Do not edit this file. It is a report generated by API Extractor.

ts

import { ApolloLink } from '@apollo/client/link';
import type { ErrorLike } from '@apollo/client';
import { Observable } from 'rxjs';

// @public (undocumented)
export namespace RetryLink {
    export type AttemptsFunction = (attempt: number, operation: ApolloLink.Operation, error: ErrorLike) => boolean | Promise<boolean>;
    export interface AttemptsOptions {
        max?: number;
        retryIf?: (error: ErrorLike, operation: ApolloLink.Operation) => boolean | Promise<boolean>;
    }
    export type DelayFunction = (attempt: number, operation: ApolloLink.Operation, error: ErrorLike) => number;
    export interface DelayOptions {
        initial?: number;
        jitter?: boolean;
        max?: number;
    }
    export interface Options {
        attempts?: RetryLink.AttemptsOptions | RetryLink.AttemptsFunction;
        delay?: RetryLink.DelayOptions | RetryLink.DelayFunction;
    }
    // (undocumented)
    export namespace RetryLinkDocumentationTypes {
        export function AttemptsFunction(attempt: number, operation: ApolloLink.Operation, error: ErrorLike): boolean | Promise<boolean>;
        export function DelayFunction(attempt: number, operation: ApolloLink.Operation, error: ErrorLike): number;
    }
}

// @public
export class RetryLink extends ApolloLink {
    constructor(options?: RetryLink.Options);
    // (undocumented)
    request(operation: ApolloLink.Operation, forward: ApolloLink.ForwardFunction): Observable<ApolloLink.Result>;
}

// (No @packageDocumentation comment for this package)