Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
07e404b089
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
15 lines (13 sloc) 480 Bytes
import { OperationVariables } from '@apollo/react-common';
import { DocumentNode } from 'graphql';
import { LazyQueryHookOptions, QueryTuple } from './types';
import { useBaseQuery } from './utils/useBaseQuery';
export function useLazyQuery<TData = any, TVariables = OperationVariables>(
query: DocumentNode,
options?: LazyQueryHookOptions<TData, TVariables>
) {
return useBaseQuery<TData, TVariables>(query, options, true) as QueryTuple<
TData,
TVariables
>;
}