A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
I am trying to use the productAPI via a NodeJS application. My question lies with the parameters you can use.
Documentation: https://shopify.dev/api/admin-rest/2021-10/resources/product#[get]/admin/api/2021-10/products.json
According to the documentation linked above, this is the way to only retrieve products based on a list of IDs:
const data = await client.get({
path: 'products',
query: {"ids":"<id_1>%2C<id_2>"},
});
However, this filter does not work for me. When I do this:
const data = await client.get({
path: 'products',
query: {"ids": [<id_1>,<id_2>]},
});
It does filter, but only by one of the ID's (I have verified that both ID's are valid)
The same thing happens when I use the 'fields' parameter
Is there something I am missing here? Any help would be appreciated