Reference / @open-music-sdk/react / tInfiniteQuery
Interface: tInfiniteQuery<P>
Defined in: integrations/react/src/query.ts:21
What useInfiniteQuery takes, for a walk: Apple's pages, each with the next Apple sent, and nothing kept back.
Type Parameters
P
P extends tPage<unknown>
Properties
getNextPageParam
readonly getNextPageParam: (lastPage) => string | undefined;Defined in: integrations/react/src/query.ts:29
The page's next, as Apple wrote it, or undefined at the last page.
Parameters
lastPage
P
Returns
string | undefined
initialPageParam
readonly initialPageParam: string | undefined;Defined in: integrations/react/src/query.ts:27
undefined: the first page is the function's.
queryFn
readonly queryFn: (context) => Promise<P>;Defined in: integrations/react/src/query.ts:25
One page, frozen: the function's own for no pageParam, else the one at that next link, asked for as paginate asks, with the same schema. Rejects as the function or request rejects: a TypeError for an argument that is not what it should be, an AppleMusicError for what fails at Apple, the network or a token provider, the reason of a signal among the arguments, or whatever a hook throws.
Parameters
context
pageParam
string | undefined
Returns
Promise<P>
queryKey
readonly queryKey: readonly unknown[];Defined in: integrations/react/src/query.ts:23
["open-music-sdk", scope, namespace, function, ...arguments]. An argument that is a schema is the marker "schema", and one that is a function or a signal is undefined in its place. A plain object is keyed by what it holds, the same way, except that a function, a signal or an undefined in it is left out. Anything else is as it is.
retry
readonly retry: false;Defined in: integrations/react/src/query.ts:31
Core retried what should be retried; three more tries on a refusal, or on a mistake, would help nobody.