Shopify GraphQL. I want to have a list of products for specific collection based on location.
Expectrd list of products. I tried:
query($collectionId: ID!, $locationId: ID!) {
collection(id: $collectionId) {
products(first: 50) {
edges {
node {
id
title
availableForSale
images(first: 50) {
edges {
node {
id
altText
originalSrc
}
}
}
variants(first: 50, query: "location_id:$locationId") {
edges {
node {
id
title
inventoryQuantity
sku
}
}
}
}
}
}
}
}
But I have an error for variants not support query