Interface UseQueryCallParameters<A, M>

Configuration to make calls to the Replica.

interface UseQueryCallParameters<A, M> {
    agent?: utils.agent.Agent;
    pollingStrategyFactory?: utils.agent.polling.PollStrategyFactory;
    canisterId?: string | types.Principal;
    effectiveCanisterId?: types.Principal;
    functionName: M;
    args?: types.ActorMethodParameters<A[M]>;
    onLoading?: ((loading) => void);
    onError?: ((error) => void);
    onSuccess?: ((data) => void);
    onSuccessResult?: ((result) => void);
    throwOnError?: boolean;
    compileResult?: boolean;
    refetchOnMount?: boolean;
    refetchInterval?: number | false;
}

Type Parameters

Hierarchy (view full)

Properties

agent?: utils.agent.Agent

An agent to use in this call, otherwise the actor or call will try to discover the agent to use.

pollingStrategyFactory?: utils.agent.polling.PollStrategyFactory

A polling strategy factory that dictates how much and often we should poll the read_state endpoint to get the result of an update call.

canisterId?: string | types.Principal

The canister ID of this Actor.

effectiveCanisterId?: types.Principal

The effective canister ID. This should almost always be ignored.

functionName: M
onLoading?: ((loading) => void)

Type declaration

    • (loading): void
    • Parameters

      • loading: boolean

      Returns void

onError?: ((error) => void)

Type declaration

    • (error): void
    • Parameters

      Returns void

onSuccess?: ((data) => void)

Type declaration

onSuccessResult?: ((result) => void)

Type declaration

throwOnError?: boolean
compileResult?: boolean
refetchOnMount?: boolean
refetchInterval?: number | false