1 | import { OperationVariables, WatchQueryFetchPolicy } from '../../core';
|
2 | import { ApolloClient, ApolloQueryResult, DocumentNode, TypedDocumentNode } from '../../core';
|
3 | import { QueryHookOptions, QueryResult } from '../types/types';
|
4 | import { useApolloClient } from './useApolloClient';
|
5 | export declare function useQuery<TData = any, TVariables = OperationVariables>(query: DocumentNode | TypedDocumentNode<TData, TVariables>, options?: QueryHookOptions<TData, TVariables>): QueryResult<TData, TVariables>;
|
6 | export declare function useInternalState<TData, TVariables>(client: ApolloClient<any>, query: DocumentNode | TypedDocumentNode<TData, TVariables>): InternalState<TData, TVariables>;
|
7 | declare class InternalState<TData, TVariables> {
|
8 | readonly client: ReturnType<typeof useApolloClient>;
|
9 | readonly query: DocumentNode | TypedDocumentNode<TData, TVariables>;
|
10 | constructor(client: ReturnType<typeof useApolloClient>, query: DocumentNode | TypedDocumentNode<TData, TVariables>, previous?: InternalState<TData, TVariables>);
|
11 | forceUpdate(): void;
|
12 | asyncUpdate(): Promise<QueryResult<TData, TVariables>>;
|
13 | private asyncResolveFns;
|
14 | private optionsToIgnoreOnce;
|
15 | useQuery(options: QueryHookOptions<TData, TVariables>): QueryResult<TData, TVariables>;
|
16 | private renderPromises;
|
17 | private queryHookOptions;
|
18 | private watchQueryOptions;
|
19 | private useOptions;
|
20 | private getObsQueryOptions;
|
21 | private ssrDisabledResult;
|
22 | private skipStandbyResult;
|
23 | private createWatchQueryOptions;
|
24 | getDefaultFetchPolicy(): WatchQueryFetchPolicy;
|
25 | private onCompleted;
|
26 | private onError;
|
27 | private observable;
|
28 | private obsQueryFields;
|
29 | private useObservableQuery;
|
30 | private result;
|
31 | private previousData;
|
32 | private setResult;
|
33 | private handleErrorOrCompleted;
|
34 | private getCurrentResult;
|
35 | private toQueryResultCache;
|
36 | toQueryResult(result: ApolloQueryResult<TData>): QueryResult<TData, TVariables>;
|
37 | private unsafeHandlePartialRefetch;
|
38 | }
|
39 | export {};
|
40 |
|
\ | No newline at end of file |