GraphQl updated_at greater than is returning old items

pklitscher
Tourist
9 0 20

When using the updated_at greater than query on products, GraphQl is returning items that were updated before the specified time.

This does not appear to be replicated in REST API.

It appears to return anything within the same hour. Here are two Postmans showing two requests with an updated_at

The first shows products with an older updated_at date being returned.

pklitscher_1-1625437318541.png

The second showing no products returned when the time is in the next hour.

pklitscher_2-1625437353936.png

 

Replies 2 (2)
SBD_
Shopify Staff
Shopify Staff
1098 146 219

Hey @pklitscher 

Can you try adjusting the date format? I just had success with the following format:

{ 
  products(first:10, query:"updated_at:'2021-07-01T21:49:05Z'") {
    edges {
      node {
        id
        updatedAt
      }
    }
  }
}

 Let me know if you're still stuck!

Scott | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

pklitscher
Tourist
9 0 20

Hi @SBD_ 

Thanks so much for the reply. 

I found that the format you shared only works for equality. i.e it will only return changes that happened at exactly that time. A micro second either side and nothing is returned. It does not provide items updated after the specified time which is what I was trying to do with this query.