Wix Stores/Products 100-query-limit?

Here is the function to bypass limit, works with 100 too, unless, you have more that 2000 elements, it will not time out

async function retrieveAllItems() {
2  let results = await wixData.query("myCollection")
3      .limit(1000)
4      .find();
5  let allItems = results.items;
6  while (results.hasNext()) {
7      results = await results.next();
8      allItems = allItems.concat(results.items);
9  }
10  return allItems;
11}
1 Like