FetchQuery
The return type of the fetchQuery function comprises of the data, error logs, loading indicator, and pagination object.
Last updated
Was this helpful?
The return type of the fetchQuery function comprises of the data, error logs, loading indicator, and pagination object.
Last updated
Was this helpful?
Param | Type | Default Value | Description |
---|---|---|---|
data
any?
null
Response data from GraphQL query
if API call succeeds.
error
any?
null
Error logs from GraphQL query if API call failed.
hasNextPage
boolean
false
Indicate if there is any next page.
hasPrevPage
boolean
false
Indicate if there is any previous page.
getNextPage
() => Promise<
FetchQuery
| null>
-
Function to get data in the next page.
getPrevPage
() => Promise<
FetchQuery
| null>
-
Function to get data in the previous page.