Hello,
I am trying to build a dashboard using the GraphQL API.
I have put together a query that gives me order id and name from a certain date range which then provides me lineItems, fulfillmentStatus, title, quantity on the order, sku, variantTitle, and any customAttributes found on the orders within the date range:
mutation {
bulkOperationRunQuery(
query:"""{
orders(query:"created_at:>2020-05-01-01T04:00:00Z created_at:<2020-07-30-01T04:23:59Z") {
edges {
node {
id
name
createdAt
lineItems(first: 15) {
edges {
node {
fulfillmentStatus
title
quantity
sku
variantTitle
customAttributes {
value
}
}
}
}
}
}
}
}
"""
) {
bulkOperation {
id
status
}
userErrors {
field
message
}
}
}
I poll the URL and get my JSONL file and then parse it within my BI program and I then massage the data.
The question I have regarding the query above is: Would it be possible to get the current on hand inventory as well so it appears next to each product listing?
I searched the documentation and it doesn’t appear that there is a straightforward way to query the current inventory quantities based on products from the orders.