UNPKG

609 BTypeScriptView Raw
1import { DocumentNode } from 'graphql';
2import { ApolloQueryResult } from 'apollo-client';
3import { Observable } from 'rxjs';
4import { Apollo } from './Apollo';
5import { QueryRef } from './QueryRef';
6import { WatchQueryOptionsAlone, QueryOptionsAlone, R } from './types';
7export declare class Query<T = {}, V = R> {
8 protected apollo: Apollo;
9 readonly document: DocumentNode;
10 client: string;
11 constructor(apollo: Apollo);
12 watch(variables?: V, options?: WatchQueryOptionsAlone<V>): QueryRef<T, V>;
13 fetch(variables?: V, options?: QueryOptionsAlone<V>): Observable<ApolloQueryResult<T>>;
14}