GraphQL returns fulfilled orders when quering unfulfilled ones

When trying to fetch unfulfilled orders using this query:

{
  orders(
    first: 50, 
    query: "fulfillment_status:unfulfilled", 
    reverse: false
  ) {
    nodes {
      id
      name
      createdAt
      displayFulfillmentStatus
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}

the API returns fulfilled orders, as well:

Why is that?

Hey @Dieter_Frei - thanks for reaching out.

I took a look at this and your query syntax is valid. One distinction is that fulfillment_status:unfulfilled includes partially fulfilled orders, while displayFulfillmentStatus is calculated separately. Those statuses can differ, but we’d need to check these specific orders to confirm the cause here.

Could you please share the shop ID of the store you’re querying? It would also help to know whether this started recently or has consistently behaved this way. If you’d prefer to share the shop ID privately, let me know and I can set up a DM.

Thanks for your feedback!

Not sure, how fulfillment_status and displayFulfillmentStatus should differ in any way, as they should definitely be exactly the same.

I filtered the admin dashboard for unfulfilled (incl. partially fulfilled) and open orders and got the same result, i.e. fulfilled orders also showed up. So here is the dev shop id: 55689969801.

Thanks in advance!

There’s also fulfillment_status:unshipped on the orders query, which should leave out the partially fulfilled ones Wes mentioned. Running that against unfulfilled and diffing the two sets would show fairly quickly whether the extra orders are coming from the partial bucket or from somewhere else.