line item in order is deleted, graphql admin api doesn’t return variant
query ($id: ID!, $lineItemFirst: Int){
order(id: $id) {
lineItems (first: $lineItemFirst){
edges {
node {
title
quantity
originalTotalSet {
shopMoney {
amount
}
}
image {
url
}
variant {
price
compareAtPrice
selectedOptions {
name
value
}
}
product {
legacyResourceId
}
}
}
pageInfo {
endCursor
hasNextPage
}
}
}
}
{
"data": {
"order": {
"lineItems": {
"edges": [
{
"node": {
"title": "测试product_name_en",
"quantity": 2,
"originalTotalSet": {
"shopMoney": {
"amount": "100.0"
}
},
"image": {
"url": "https://cdn.shopify.com/s/files/1/0565/5416/0185/products/15505591861812081085.jpg?v=1677055881"
},
"variant": null,
"product": {
"legacyResourceId": "6990649983033"
}
}
},
{
"node": {
"title": "测试product_name_en",
"quantity": 2,
"originalTotalSet": {
"shopMoney": {
"amount": "100.0"
}
},
"image": {
"url": "https://cdn.shopify.com/s/files/1/0565/5416/0185/products/15505591861812081085.jpg?v=1677055881"
},
"variant": {
"price": "50.00",
"compareAtPrice": "99.00",
"selectedOptions": [
{
"name": "color",
"value": "Army Green"
},
{
"name": "Size",
"value": "M"
}
]
},
"product": {
"legacyResourceId": "6990649983033"
}
}
},
{
"node": {
"title": "测试product_name_en",
"quantity": 1,
"originalTotalSet": {
"shopMoney": {
"amount": "63.0"
}
},
"image": {
"url": "https://cdn.shopify.com/s/files/1/0565/5416/0185/products/15541964492527350411.jpg?v=1677055549"
},
"variant": {
"price": "63.00",
"compareAtPrice": "103.00",
"selectedOptions": [
{
"name": "color",
"value": "Multicolor"
},
{
"name": "Size",
"value": "M"
}
]
},
"product": {
"legacyResourceId": "6990648999993"
}
}
},
{
"node": {
"title": "测试product_name_en1",
"quantity": 1,
"originalTotalSet": {
"shopMoney": {
"amount": "1.0"
}
},
"image": {
"url": "https://cdn.shopify.com/s/files/1/0565/5416/0185/products/20230201-150917_2x_83af87b0-5e89-477c-8de8-2448f88afa2e.png?v=1676895001"
},
"variant": {
"price": "1.00",
"compareAtPrice": "33.00",
"selectedOptions": [
{
"name": "Color123",
"value": "Blue"
},
{
"name": "Size",
"value": "XS"
}
]
},
"product": {
"legacyResourceId": "6985818964025"
}
}
},
{
"node": {
"title": "测试product_name_en",
"quantity": 1,
"originalTotalSet": {
"shopMoney": {
"amount": "5.0"
}
},
"image": {
"url": "https://cdn.shopify.com/s/files/1/0565/5416/0185/products/1547695959928981774.jpg?v=1677034093"
},
"variant": {
"price": "5.00",
"compareAtPrice": "45.00",
"selectedOptions": [
{
"name": "color",
"value": "Multicolor"
}
]
},
"product": {
"legacyResourceId": "6986166337593"
}
}
}
],
"pageInfo": {
"endCursor": "eyJsYXN0X2lkIjoxMTM3NTI2MzU4MDIxNywibGFzdF92YWx1ZSI6MTEzNzUyNjM1ODAyMTd9",
"hasNextPage": false
}
}
}
},
"extensions": {
"cost": {
"requestedQueryCost": 903,
"actualQueryCost": 32,
"throttleStatus": {
"maximumAvailable": 10000,
"currentlyAvailable": 9968,
"restoreRate": 500
}
}
}
}
