fetchQueryWithPagination

Fetch data from Airstack by calling queries to the Airstack API with pagination included. If you don't need pagination, use fetchQuery instead.

Pre-requisites

  • Calling init function

Example

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

const { data, error, hasNextPage, hasPrevPage, getNextPage, getPrevPage } =
  await fetchQueryWithPagination(query, variables, config);

Function Signature

function fetchQueryWithPagination(
  query: string,
  variables?: Variables,
  config?: { cache?: boolean }
): Promise<FetchQuery>

Params

Responses

Last updated

Was this helpful?