GraphQL Date Query

New Member
22 0 0

I would like to know the orders on a specific date or range of dates, such as on 2018-12-04 or between 2018-11-01 and 2018-11-30. Does anyone know how to do this with GraphQL?

0 Likes
Shopify Staff
Shopify Staff
297 32 63

Hey David,

I would check out this thread, but yes it's definitely possible with GraphQL and would look something like this:

orders(first: 10, query:"created_at:>2018-11-01 created_at:<2018-11-31")

 

1 Like
Highlighted
Excursionist
26 0 0

Hi @Zameer 

 

orders(first:10, query:"created_at:>2019-10-01T04:00:00Z" )    => works

orders(first:10, query:"created_at:<2019-10-01T04:10:00Z" )    => works

orders(first:10, query:"created_at:>2019-10-01T04:00:00Z created_at:<2019-10-01T04:10:00Z" ) => but get no result(empty array) even there are some orders in this date range.

 

Could you please help me to get the correct results?

0 Likes