Skip to main content

Interface: UsePaginatedQueryData<TData, TArgs>#

Type parameters#

Name
TData
TArgs

Properties#

args#

args: TArgs

Current arguments used in the query

Defined in: react/src/query/usePaginatedQuery.ts:67


called#

called: boolean

Has the function been called

Defined in: react/src/query/usePaginatedQuery.ts:97


data#

data: undefined | TData

Query Data

Defined in: react/src/query/usePaginatedQuery.ts:63


fetchMore#

fetchMore: (newArgs?: TArgs | (data: FetchMoreCallbackArgs<TData, TArgs>) => TArgs, fetchPolicy?: PaginatedQueryFetchPolicy) => TData | Promise<TData>

Main function to be used

If new args are not specified, the previous or initial args are used

In the second parameter you can override the "fetchPolicy", for example you can set it to "network-only" to do a refetch.

Type declaration:#

▸ (newArgs?: TArgs | (data: FetchMoreCallbackArgs<TData, TArgs>) => TArgs, fetchPolicy?: PaginatedQueryFetchPolicy): TData | Promise<TData>

Parameters:#

NameType
newArgs?TArgs | (data: FetchMoreCallbackArgs<TData, TArgs>) => TArgs
fetchPolicy?PaginatedQueryFetchPolicy

Returns: TData | Promise<TData>

Defined in: react/src/query/usePaginatedQuery.ts:79


isLoading#

isLoading: boolean

Network fetch is loading

Defined in: react/src/query/usePaginatedQuery.ts:71

Last updated on by Sam Denty