Artists

useAllArtistsQuery(params?: IApiListQueryParams, queryOptions?: UseQueryOptions): {artists: IArtist[], ...UseQueryResult}

Used for querying list of all artists. If no params are provided, it will return list of all artists existing in the database, which will result in huge request. For pagination/infinite scroll queries, usePaginatedArtistsQuery is recommended.

usePaginatedArtistsQuery(pageSize? = 20, params?: Pick<IApiListQueryParams, 'filter' | 'orderBy'>, queryOptions?: UseInfiniteQueryOptions): {artists: IArtist[], totalCount: number | null, ...UseInfiniteQueryResult}

Used for querying list of all artists in chunks, e.g. for infinity list. Returns flat artists array with all fetched items, totalCount and all UseInfiniteQueryResul properties including fetchNextPage and hasNextPage properties for pagination.

useArtistQuery(idOrSlug: string, queryOptions?: UseQueryOptions): {artist: IArtist | null, tracks: ITrack[], ...UseQueryResult}

Used for querying list of all artists. If no params are provided, it will return list of all artists existing in the database, which will result in huge request. For pagination/infinite scroll queries, usePaginatedArtistsQuery is recommended.

Last updated