description |
layout |
Fetch data from Airstack by calling queries to the Airstack API. If you need any pagination, use fetchQueryWithPagination instead. |
title |
description |
tableOfContents |
outline |
pagination |
|
|
|
|
|
|
import { fetchQuery } from "@airstack/airstack-react";
const { data, error } = await fetchQuery(query, variables, config);
fetchQuery(
query: string,
variables?: Variables,
config: Config
): Promise<Pick<FetchQuery, "data" | "error">>
Param |
Type |
Default Value |
Description |
query |
string |
- |
Airstack GraphQL query |
variables |
Variables |
null |
GraphQL query variables |
config |
{ cache?: boolean } |
null |
Caching configuration |
Param |
Type |
Default Value |
Description |
response |
Promise<Pick< FetchQuery , "data" | "error">> |
null |
Response object from GraphQL query . |