.api-reports/api-report-link_persisted-queries.api.md
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 @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)