import { GraphQLParams, Plugin, PromiseOrValue } from 'graphql-yoga'; export declare type ExtractPersistedOperationId = (params: GraphQLParams) => null | string; export declare const defaultExtractPersistedOperationId: ExtractPersistedOperationId; declare type AllowArbitraryOperationsHandler = (request: Request) => PromiseOrValue; export interface UsePersistedOperationsOptions { /** * A function that fetches the persisted operation */ getPersistedOperation(key: string): PromiseOrValue; /** * Whether to allow execution of arbitrary GraphQL operations aside from persisted operations. */ allowArbitraryOperations?: boolean | AllowArbitraryOperationsHandler; /** * The path to the persisted operation id */ extractPersistedOperationId?: ExtractPersistedOperationId; } export declare function usePersistedOperations>({ getPersistedOperation, allowArbitraryOperations, extractPersistedOperationId, }: UsePersistedOperationsOptions): Plugin; export {};