Hi, I want to get all product variants with full inventory items. I try to get the quantities in inventoryItem, but I get errors: Field ‘quantities’ doesn’t exist on type ‘InventoryLevel’. Please help me resolve this problem. Thank you so much.
My graphQL code
query InventoryItems(
\$limit: Int!,
\$cursor: String,
\$query: String,
\$locationId: ID!
) {
productVariants (first: \$limit, after: \$cursor) {
edges {
node {
id
title
displayName
image {
url
}
inventoryItem {
id
sku
inventoryLevel(locationId: \$locationId) {
id
quantities (names: "available") {
quantity
name
}
}
}
product {
id
hasOnlyDefaultVariant
title
featuredImage {
id
url
altText
}
}
}
cursor
}
pageInfo {
hasNextPage
endCursor
}
}
}