Skip to main content

TypeAlias.PaginatedData

type PaginatedData<T>: {
hasNextPage: boolean;
hasPrevPage: boolean;
nodes: T[];
totalCount: number;
};

An object representing a paginated data API result.

Type Parameters

Type ParameterDescription
TThe data type being paginated

Type declaration

NameTypeDescription
hasNextPagebooleanA boolean indicating wether the paginated data has a next page or not.
hasPrevPagebooleanA boolean indicating wether the paginated data has a previous page or not.
nodesT[]An array of the data.
totalCountnumberThe number of total results.