Tags:
- Customer Account API
- 2026-04
Line item component information now available for draft orders on the Customer Account API
As of Customer Account API version 2026-04, the object includes a new components field. This field returns the individual component line items associated with a parent line item.
Additionally, a new optional argument, , has been introduced to the connection. For API versions 2026-04 and later, defaults to false, meaning only top-level line items are returned as nodes, with their components accessible via the field. If set to true, both parent and component line items are returned as top-level nodes, aligning with the behavior of earlier API versions. For versions prior to 2026-04, defaults to true to ensure backward compatibility.
Example
query {
draftOrder(id: "gid://shopify/DraftOrder/1") {
lineItems(first: 10) {
nodes {
name
quantity
components {
name
quantity
}
}
}
}
}
Was this section helpful?