import GraphQLClient from './GraphQLClient'; import { LocalClientOptions, LocalQueries, Operation, RequestOptions, Result } from './types/common-types'; /** Local version of the GraphQLClient which only returns specified queries * Meant to be used as a way to easily mock and test queries during development. This client never contacts any actual server. * Queries are given in the form of an object of functions. * Example: ``` const localQueries = { [allPostsQuery]: () => ({ allPosts: [ { id: 1, title: 'Test', url: 'https://example.com' } ] }), [createPostMutation]: () => ({ createPost: { id: 1 } }), } const client = new LocalGraphQLClient({ localQueries }) ``` */ declare class LocalGraphQLClient extends GraphQLClient { localQueries: LocalQueries; requestDelayMs: number; constructor(config: LocalClientOptions); verifyConfig(): void; requestViaHttp(operation: Operation, options?: RequestOptions): Promise>; request(operation: Operation, options?: RequestOptions): Promise>; } export default LocalGraphQLClient;