Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

bulkOperationRunQuery - quantityPriceBreaks error "Connection fields without 'id': prices"

bulkOperationRunQuery - quantityPriceBreaks error "Connection fields without 'id': prices"

krhall21
Shopify Partner
2 0 0

The following query fails with error "The parent 'node' field for a nested connection must select the 'id' field without an alias and must be of 'ID' return type. Connection fields without 'id': prices."

According to the documentation "prices" does not have an "id" field. Is this an implementation error? Is there another way to run a bulk operation to list quantityPriceBreaks for priceLists ?

 

mutation GetPriceListPriceBreaks {
bulkOperationRunQuery(
query: """
{
priceLists(sortKey: NAME) {
edges {
node {
id name
catalog {
title
}
prices (first: 5) {
edges {
node {
variant {
product {
id handle title
}
id sku
}
price {
amount
}
quantityPriceBreaks(first: 10, sortKey: MINIMUM_QUANTITY) {
edges {
node {
minimumQuantity
price {
amount
}
}
}
}
}
}
}
}
}
}
}
"""
) {
bulkOperation {
id
status
}
userErrors {
field
message
}
}
}

Replies 2 (2)

ShopifyDevSup
Shopify Staff
1453 239 534

Hey @krhall21

 

Just looking at your query here, this would work as a normal graphQL query. The issue you're running in to here is your query is nexted 3 levels deep. 

 

The quantityPriceBreaks nested under prices is what's causing the error. If you remove that field it will go through properly. 

 

For clarity, this limitation is documented here: https://shopify.dev/docs/api/usage/bulk-operations/queries#operation-restrictions 

 

Hope that helps

 

- Kyle G.

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

krhall21
Shopify Partner
2 0 0

Thanks Kyle, but the question remains: Is there a way to run a bulk operation to list all the variant quantityPriceBreaks for a priceList?