apollo-angular
Version:
Use your GraphQL data in your Angular app, with the Apollo Client
16 lines (15 loc) • 739 B
TypeScript
import { DocumentNode } from 'graphql';
import { ApolloQueryResult } from '@apollo/client/core';
import { TypedDocumentNode } from '@graphql-typed-document-node/core';
import { Observable } from 'rxjs';
import { Apollo } from './apollo';
import { QueryRef } from './query-ref';
import { WatchQueryOptionsAlone, QueryOptionsAlone, EmptyObject } from './types';
export declare class Query<T = {}, V = EmptyObject> {
protected apollo: Apollo;
readonly document: DocumentNode | TypedDocumentNode<T, V>;
client: string;
constructor(apollo: Apollo);
watch(variables?: V, options?: WatchQueryOptionsAlone<V, T>): QueryRef<T, V>;
fetch(variables?: V, options?: QueryOptionsAlone<V, T>): Observable<ApolloQueryResult<T>>;
}