listAndCount - Product Module Reference
BetaThis documentation provides a reference to the listAndCount method. This belongs to the Product Module.
This method is used to retrieve a paginated list of products along with the total count of available products satisfying the provided filters.
Example
To retrieve a list of products using their IDs:
To specify relations that should be retrieved within the products:
By default, only the first 15 records are retrieved. You can control pagination by specifying the skip and take properties of the config parameter:
Parameters
filtersFilterableProductPropsThe filters to apply on the retrieved products.
filtersFilterableProductPropsconfigFindConfig<ProductDTO>The configurations determining how the products are retrieved. Its properties, such as select or relations, accept the
attributes or relations associated with a product.
configFindConfig<ProductDTO>select or relations, accept the
attributes or relations associated with a product.Returns
The list of products along with the total count.
Was this section helpful?