I want to make a query to get the product detail by the location
This is my actual query with graphql:
query Product{
product(id:"gid://shopify/Product/id") {
title
handle
description
priceRange {
maxVariantPrice {
amount
currencyCode
}
}
options(first: 1) {
values
}
variants(first: 7) {
edges {
node {
availableForSale
inventoryQuantity
selectedOptions {
name
value
}
}
}
}
images(first: 3) {
edges {
node {
transformedSrc(maxHeight: 600, preferredContentType: JPG)
altText
}
}
}
}
}
Result:
{
"data": {
"product": {
"title": "Vestido Catalina Noir",
"handle": "vestido-catalina-noir",
"description": "El perfecto oversized. Friendly para un asado en familia y mas de un postre. Creamos ese vestido fresco que pairs well con el verano paraguayo y nuestros carbs favoritos. - Sin manguitas - 100% poliester - Oversized - Midi - Con bolsillos Hecho por Carolina Stephie viste un talle XS Para info sobre nuestra polĆtica de devolución y la recepción de prenda, leĆ©me",
"priceRange": {
"maxVariantPrice": {
"amount": "379000.0",
"currencyCode": "PYG"
}
},
"options": [
{
"values": [
"xs",
"s",
"m",
"l",
"xl"
]
}
],
"variants": {
"edges": [
{
"node": {
"availableForSale": true,
"inventoryQuantity": 4,
"selectedOptions": [
{
"name": "TamaƱo",
"value": "xs"
},
{
"name": "Color",
"value": "Noir"
}
]
}
},
{
"node": {
"availableForSale": true,
"inventoryQuantity": 5,
"selectedOptions": [
{
"name": "TamaƱo",
"value": "s"
},
{
"name": "Color",
"value": "Noir"
}
]
}
},
{
"node": {
"availableForSale": true,
"inventoryQuantity": 6,
"selectedOptions": [
{
"name": "TamaƱo",
"value": "m"
},
{
"name": "Color",
"value": "Noir"
}
]
}
},
{
"node": {
"availableForSale": true,
"inventoryQuantity": 3,
"selectedOptions": [
{
"name": "TamaƱo",
"value": "l"
},
{
"name": "Color",
"value": "Noir"
}
]
}
},
{
"node": {
"availableForSale": false,
"inventoryQuantity": 0,
"selectedOptions": [
{
"name": "TamaƱo",
"value": "xl"
},
{
"name": "Color",
"value": "Noir"
}
]
}
}
]
},
"images": {
"edges": [
{
"node": {
"transformedSrc": "https://cdn.shopify.com/s/files/1/1816/7365/products/20A4979_x600.png.jpg?v=1572442259",
"altText": null
}
},
{
"node": {
"transformedSrc": "https://cdn.shopify.com/s/files/1/1816/7365/products/20A4981_x600.png.jpg?v=1572442259",
"altText": null
}
},
{
"node": {
"transformedSrc": "https://cdn.shopify.com/s/files/1/1816/7365/products/20A4989_x600.png.jpg?v=1572442259",
"altText": null
}
}
]
}
}
},
"extensions": {
"cost": {
"requestedQueryCost": 24,
"actualQueryCost": 20,
"throttleStatus": {
"maximumAvailable": 1000,
"currentlyAvailable": 980,
"restoreRate": 50
}
}
}
}
This query only show the product variants of a single location, I have two locations with their respective inventories,
how can I make a list according to the location?