orders api(s) not processing filters correctly

justinpg
New Member
2 0 1

Hello,

 

Recently the order api(s) seem to have stopped processing query filters correctly.  I've noticed both the GraphQL and REST API no longer return the correct results with status:open as a filter.

 

E.g.,

 

curl -X "POST" "https://vst-integration.myshopify.com/admin/api/2020-01/graphql.json" \
     -H 'X-Shopify-Access-Token: XXXXXXX\
     -H 'Content-Type: application/graphql' \
     -d $'query {
			  orders(query:"status:open"  first:1){
			  pageInfo {
			      hasNextPage
			      hasPreviousPage
			    }
			   edges{
			      node{
			       customer {
			          id
			         firstName
			          lastName
			         email
			        }
			        id
		        tags
			       lineItems(first:  2  ){
		          edges{
			           node{
		              product {
			              id
			           }
			            }
			          }
			          pageInfo {
			            hasNextPage
			          }
			        }
			     },
			      cursor
			    }
			  }
			}'

returns 0 results

 

X-Request-ID: b353097c-c3cb-43f7-abf4-8908a486f26c

{
   "data":{
      "orders":{
         "pageInfo":{
            "hasNextPage":false,
            "hasPreviousPage":false
         },
         "edges":[

         ]
      }
   },
   "extensions":{
      "cost":{
         "requestedQueryCost":10,
         "actualQueryCost":2,
         "throttleStatus":{
            "maximumAvailable":1000.0,
            "currentlyAvailable":998,
            "restoreRate":50.0
         }
      }
   }
}

However there is 1 open order in the store.

 

Screen Shot 2020-05-01 at 11.30.58 PM.png

 

I've noticed this same problem with the REST API.

 

This call used to work as it was running in a live Shopify application.

 

 

 

0 Likes
SBD_
Shopify Staff
Shopify Staff
1043 141 183

Hey @justinpg 

 

Thanks for reporting this - I'm unable to replicate, are you still experiencing issues?

0 Likes
justinpg
New Member
2 0 1
It looks like the read_all_orders pemissions for the app was removed which of course stopped orders from being returned. Adding those backed fixed the issue.