Skip to content

Latest commit

 

History

History
57 lines (44 loc) · 2.3 KB

uselazyquerywithpagination.md

File metadata and controls

57 lines (44 loc) · 2.3 KB
description layout
Manually trigger data fetching from Airstack by calling queries to the Airstack API with pagination included. If you don't need pagination, use useLazyQuery instead.
title description tableOfContents outline pagination
visible
true
visible
true
visible
true
visible
visible
true

useLazyQueryWithPagination

Pre-requisites

  • Calling init function

Example

import { useLazyQueryWithPagination } from "@airstack/airstack-react";

const { data, error, loading pagination } =
  useLazyQueryWithPagination(query, variables, configAndCallbacks);

Function Signature

function useLazyQueryWithPagination(
  query: string,
  variables?: Variables,
  configAndCallbacks: ConfigAndCallbacks
): useLazyQueryWithPaginationReturnType

Params

Param Type Default Value Description
query string - Airstack API key
variables Variables? null GraphQL query variables
configAndCallbacks ConfigAndCallbacks? null Additional configurations and callbacks.

Responses

Param Type Default Value Description
response UseLazyQueryWithPaginationReturnType - Response from the hook that will return an execute function, data, error logs, loading state, and pagination.