Hi,
I’m using the Shopify GraphQL Admin API to fetch order details. The issue I’m facing is that when a line item is removed from an order in the Shopify admin panel, it still appears in the GraphQL API response.
Here is GraphQL Query:
query = `
query GetOrders($cursor: String) {
orders(first: 100, after: $cursor, query: "id:${ORDER_ID}") {
pageInfo {
hasNextPage
}
edges {
cursor
node {
id
name
createdAt
updatedAt
displayFinancialStatus
currencyCode
total_price: totalPriceSet {
shopMoney {
amount
}
}
purchasingEntity {
__typename
... on PurchasingCompany {
company {
id
name
}
}
}
refunds {
id
createdAt
totalRefundedSet {
shopMoney {
amount
currencyCode
}
}
}
}
}
}
}
`;
Response :
{“data”: {“orders”: {“pageInfo”: {“hasNextPage”: false},“edges”: [{“cursor”: “***************”,“node”: {“id”: “gid://shopify/Order/MASKED_ORDER_ID”,“name”: “#MASKED_ORDER_NUMBER”,“createdAt”: “2025-08-22T23:33:38Z”,“updatedAt”: “2025-08-28T18:40:57Z”,“displayFinancialStatus”: “PAID”,“currencyCode”: “USD”,“total_price”: {“shopMoney”: {“amount”: “2270.54”}},“purchasingEntity”: {“__typename”: “Customer”},“refunds”: [{“id”: “gid://shopify/Refund/MASKED_REFUND_ID”,“createdAt”: “2025-08-25T16:26:09Z”,“totalRefundedSet”: {“shopMoney”: {“amount”: “0.0”,“currencyCode”: “USD”}}}]}}]}},“extensions”: {“cost”: {“requestedQueryCost”: 38,“actualQueryCost”: 5,“throttleStatus”: {“maximumAvailable”: 20000,“currentlyAvailable”: 19995,“restoreRate”: 1000}}}}
I have attached a screenshot from the Shopify panel

