Skip to main content

useLazyLoadQuery

Callable

  • useLazyLoadQuery<TChainId, TQuery>(builder: TQuery, options?: ChainHookOptions<TChainId>): TQuery extends Falsy ? any : FalsyGuard<ReturnType<Exclude<TQuery, Falsy>>, FlatHead<InferQueryPayload<Exclude<ReturnType<Exclude<TQuery, Falsy>>, Falsy>>>, any>

  • Hook for querying data from chain, and returning the response.


    Type parameters

    • TChainId: any
    • TQuery: any

    Parameters

    • builder: TQuery

      The function to create the query

    • optionaloptions: ChainHookOptions<TChainId>

      Additional options

    Returns TQuery extends Falsy ? any : FalsyGuard<ReturnType<Exclude<TQuery, Falsy>>, FlatHead<InferQueryPayload<Exclude<ReturnType<Exclude<TQuery, Falsy>>, Falsy>>>, any>

    The data response