Hey everyone đź‘‹
I’m facing an issue when calling the /store/products endpoint.
My database contains around 160,000 products, and in the code there’s this line:
const queryObject = remoteQueryObjectFromString({
entryPoint: 'product',
variables: {
filters: req.filterableFields,
...req.queryConfig.pagination,
...context,
},
fields: req.queryConfig.fields,
});
The problem is that req.filterableFields ends up including a filter on id with the full list of all product IDs in the database.
That massive filter causes a “Maximum call stack size exceeded” error.
Has anyone run into this issue before? Is there a known workaround or a better way to handle filtering by a very large set of IDs?
Any advice would be much appreciated 🙏