1 | import { GraphQLParams, Plugin, PromiseOrValue } from 'graphql-yoga';
|
2 | export declare type ExtractPersistedOperationId = (params: GraphQLParams) => null | string;
|
3 | export declare const defaultExtractPersistedOperationId: ExtractPersistedOperationId;
|
4 | declare type AllowArbitraryOperationsHandler = (request: Request) => PromiseOrValue<boolean>;
|
5 | export interface UsePersistedOperationsOptions {
|
6 | |
7 |
|
8 |
|
9 | getPersistedOperation(key: string): PromiseOrValue<string | null>;
|
10 | |
11 |
|
12 |
|
13 | allowArbitraryOperations?: boolean | AllowArbitraryOperationsHandler;
|
14 | |
15 |
|
16 |
|
17 | extractPersistedOperationId?: ExtractPersistedOperationId;
|
18 | }
|
19 | export declare function usePersistedOperations<TPluginContext extends Record<string, any>>({ getPersistedOperation, allowArbitraryOperations, extractPersistedOperationId, }: UsePersistedOperationsOptions): Plugin<TPluginContext>;
|
20 | export {};
|