I’m making a simple GraphQL request using a fragment to retrieve order information. It’s a simple request:
query($recordLimit:Int=5 $itemLimit:Int=10 $cursor:String $sort:String $specificOrder:String) {
orders(shop_name:"cocoa-via-dev.myshopify.com" partner_order_id:$specificOrder) {
...orderFields
}
}
fragment orderFields on OrdersQueryResult {
request_id
complexity
data(first:$recordLimit after:$cursor sort:$sort) {
[...]
}
}
When I run this query, the result is including an errors object. Is it expected to always return an errors object with every query, or is it meant to only return an errors object when in fact an error occurs?
{
"errors": [
{
"message": "'orders'"
}
],
"data": {
"orders": {
"request_id": "5ee7c7edcfa49aee12aa16e1",
"complexity": null,
"data": {
"pageInfo": {
"hasNextPage": false,
"hasPreviousPage": false,
"startCursor": "YXJyYXljb25uZWN0aW9uOjA=",
"endCursor": "YXJyYXljb25uZWN0aW9uOjA="
},
[...]
}
}
}
}