Open vettloffah opened 1 year ago
@vettloffah I see that you are facing a type mismatch. We have not yet fully developed the type system, as you have already noticed.
Try wrapping your query condition in where:
const productResponse = await swell.products.list({
where: {
id: { $in: productIds } // productIds is an array of IDs
}
})
Hi @awwit as I said in the original post here, the "where" flag returns no results, even though it should. That is why I created this issue.
Hi @vettloffah I checked that the where
statement works fine for products.list
. But only active products are returned, you may be trying to request inactive ones.
It looks like there is no way to query inactive products via products.list
.
This is shown as a type error, however it is a valid API call:
And trying to do this same thing with the "where" flag actually doesn't properly return any products.