Skip to content

TGetProductsOptions object

TGetProductsOptions is an object which represents the options for fetching products.

  • queryParams: object (optional)
  • queryParams.page: number
  • queryParams.limit: number
useStorefront(async (storefront) => {
    const productFetcherApi = await storefront.getApi('ProductFetcherApi');

    const getProductsOptions = {
        queryParams: {
            page: 1,
            limit: 10
        }
    };

    const products = await productFetcherApi.getProducts([1, 2], getProductsOptions);
    console.log(products);
});