Hello guys,
I am running the following query to get the product’s data, but when I add the field to get inventory levels and location, it returns the error “Bulk queries cannot contain more than 5 connections”.
Using Grapql API version 2023-10.
-
How can I get the whole data of products with the bulk query?
-
Also, how to get the inventory and its location for products? I am getting it only at the variants level. Is there any possibility of getting this at the product level?
mutation {
bulkOperationRunQuery(
query: """
{
products {
edges {
node {
id
createdAt
updatedAt
title
handle
descriptionHtml
productType
collections {
edges {
node {
id
title
}
}
}
metafields {
edges {
node {
namespace
key
value
}
}
}
variants {
edges {
node {
id
title
weight
weightUnit
price
inventoryQuantity
metafields {
edges {
node {
namespace
key
value
}
}
}
}
}
}
options {
name
position
values
}
priceRange {
minVariantPrice {
amount
currencyCode
}
maxVariantPrice {
amount
currencyCode
}
}
}
}
}
}
"""
) {
bulkOperation {
id
status
}
userErrors {
field
message
}
}
}
`