UNPKG

825 BTypeScriptView Raw
1import ApolloClient from "apollo-client";
2import { GraphClient, MutationOptions, QueryOptions } from "../spi/graph/GraphClient";
3/**
4 * Implementation of GraphClient using Apollo Client.
5 */
6export declare class ApolloGraphClient implements GraphClient {
7 endpoint: string;
8 /**
9 * Configured Apollo Client instance subclasses can use directly
10 */
11 readonly client: ApolloClient<any>;
12 /**
13 * Create a new GraphClient
14 * @param endpoint GraphQL endpoint
15 * @param headers any special headers to use
16 */
17 constructor(endpoint: string, headers?: any);
18 query<T, Q>(options: QueryOptions<Q> | string): Promise<T>;
19 mutate<T, Q>(options: MutationOptions<Q> | string): Promise<T>;
20 private executeQuery;
21 private executeMutation;
22}
23//# sourceMappingURL=ApolloGraphClient.d.ts.map
\No newline at end of file