UNPKG

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