Regardless of the ‘sort’ argument supplied, the line items will always be sorted by legacy_id in an order’s LineItemConnection. Are we using the query wrong, or is this feature not implemented?
query {
order(id: "T****************3") {
data {
line_items(sort: "price") {
edges {
node {
price
legacy_id
}
}
}
}
}
}
EDIT: I just noticed that in the example I provided, one could consider line items to be sorted by their price alphabetically, but this is completely coincidental and is just due to my failure to pick a more neutral example. Another example query (request_id: 62f3c90f67470bcbdf7cfded) returns:
"line_items": {
"edges": [
{
"node": {
"price": "25.0000",
"legacy_id": 7*****073
}
},
{
"node": {
"price": "6.0000",
"legacy_id": 7*****074
}
},
{
"node": {
"price": "45.0000",
"legacy_id": 7*****075
}
},
{
"node": {
"price": "4.0000",
"legacy_id": 7*****076
}
},
{
"node": {
"price": "2.0000",
"legacy_id": 7*****077
}
},
{
"node": {
"price": "94.0000",
"legacy_id": 7*****078
}
},
{
"node": {
"price": "12.0000",
"legacy_id": 7*****895
}
}
]
}