import ApolloClient from "apollo-client"; import { Operation } from "apollo-link"; import { GraphClient, MutationOptions, QueryOptions } from "../spi/graph/GraphClient"; /** * Listen and mutate GraphQL operations before they are being executed */ export interface GraphClientListener { operationStarting(operation: Operation): Operation; } /** * Implementation of GraphClient using Apollo Client. */ export declare class ApolloGraphClient implements GraphClient { readonly endpoint: string; private readonly headers; private readonly fetch; private readonly listeners; /** * Configured Apollo Client instance subclasses can use directly */ readonly client: ApolloClient; /** * Create a new GraphClient * @param endpoint GraphQL endpoint * @param headers any special headers to use * @param fetch configured GlobalFetch instance to use for this GraphClient */ constructor(endpoint: string, headers?: any, fetch?: WindowOrWorkerGlobalScope["fetch"], listeners?: GraphClientListener[]); query(options: QueryOptions | string): Promise; mutate(options: MutationOptions | string): Promise; private executeQuery; private executeMutation; } //# sourceMappingURL=ApolloGraphClient.d.ts.map