Skip to content

Latest commit

 

History

History
84 lines (74 loc) · 2.68 KB

File metadata and controls

84 lines (74 loc) · 2.68 KB

API Report File for "@apollo/client"

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

import { ApolloLink } from '@apollo/client/link';
import type { DocumentNode } from 'graphql';
import type { ErrorLike } from '@apollo/client';
import type { FormattedExecutionResult } from 'graphql';

// @public (undocumented)
interface BaseOptions {
    // (undocumented)
    disable?: (options: PersistedQueryLink.DisableFunctionOptions) => boolean;
    // (undocumented)
    retry?: (options: PersistedQueryLink.RetryFunctionOptions) => boolean;
    // (undocumented)
    useGETForHashedQueries?: boolean;
}

// @public @deprecated (undocumented)
export const createPersistedQueryLink: (options: PersistedQueryLink.Options) => PersistedQueryLink;

// @public (undocumented)
export namespace PersistedQueryLink {
    // (undocumented)
    export interface DisableFunctionOptions extends PersistedQueryLink.RetryFunctionOptions {
    }
    // (undocumented)
    export interface ErrorMeta {
        // (undocumented)
        persistedQueryNotFound: boolean;
        // (undocumented)
        persistedQueryNotSupported: boolean;
    }
    // (undocumented)
    export type GenerateHashFunction = (document: DocumentNode) => string | PromiseLike<string>;
    // (undocumented)
    export interface GenerateHashOptions extends BaseOptions {
        // (undocumented)
        generateHash: PersistedQueryLink.GenerateHashFunction;
        // (undocumented)
        sha256?: never;
    }
    // (undocumented)
    export type Options = PersistedQueryLink.SHA256Options | PersistedQueryLink.GenerateHashOptions;
    // (undocumented)
    export interface RetryFunctionOptions {
        // (undocumented)
        error: ErrorLike;
        // (undocumented)
        meta: PersistedQueryLink.ErrorMeta;
        // (undocumented)
        operation: ApolloLink.Operation;
        // (undocumented)
        result?: FormattedExecutionResult;
    }
    // (undocumented)
    export type SHA256Function = (queryString: string) => string | PromiseLike<string>;
    // Warning: (ae-forgotten-export) The symbol "BaseOptions" needs to be exported by the entry point index.d.ts
    //
    // (undocumented)
    export interface SHA256Options extends BaseOptions {
        // (undocumented)
        generateHash?: never;
        // (undocumented)
        sha256: PersistedQueryLink.SHA256Function;
    }
}

// @public (undocumented)
export class PersistedQueryLink extends ApolloLink {
    constructor(options: PersistedQueryLink.Options);
    // (undocumented)
    resetHashCache: () => void;
}

// @public (undocumented)
export const VERSION = 1;

// (No @packageDocumentation comment for this package)