Back to Apollo Client

Api Report Link Persisted Queries.Api

.api-reports/api-report-link_persisted-queries.api.md

3.14.12.4 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 { DocumentNode } from 'graphql';
import type { ErrorLike } from '@apollo/client';
import type { FormattedExecutionResult } from 'graphql';

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

// @public (undocumented)
export namespace PersistedQueryLink {
    // (undocumented)
    export namespace Base {
        export interface Options {
            disable?: (options: PersistedQueryLink.DisableFunctionOptions) => boolean;
            retry?: (options: PersistedQueryLink.RetryFunctionOptions) => boolean;
            useGETForHashedQueries?: boolean;
        }
    }
    export interface DisableFunctionOptions extends PersistedQueryLink.RetryFunctionOptions {
    }
    export interface ErrorMeta {
        persistedQueryNotFound: boolean;
        persistedQueryNotSupported: boolean;
    }
    export type GenerateHashFunction = (document: DocumentNode) => string | PromiseLike<string>;
    export interface GenerateHashOptions extends Base.Options {
        generateHash: PersistedQueryLink.GenerateHashFunction;
        // (undocumented)
        sha256?: never;
    }
    export type Options = PersistedQueryLink.SHA256Options | PersistedQueryLink.GenerateHashOptions;
    // (undocumented)
    export namespace PersistedQueryLinkDocumentationTypes {
        export function GenerateHashFunction(document: DocumentNode): string | PromiseLike<string>;
        export function SHA256Function(queryString: string): string | PromiseLike<string>;
    }
    export interface RetryFunctionOptions {
        error: ErrorLike;
        meta: PersistedQueryLink.ErrorMeta;
        operation: ApolloLink.Operation;
        result?: FormattedExecutionResult;
    }
    export type SHA256Function = (queryString: string) => string | PromiseLike<string>;
    export interface SHA256Options extends Base.Options {
        // (undocumented)
        generateHash?: never;
        sha256: PersistedQueryLink.SHA256Function;
    }
}

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

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

// (No @packageDocumentation comment for this package)