Filtering orders by date creation in GraphQL

Topic summary

Issue Identified:
A user encountered problems filtering orders by creation date using the created_at filter in the GraphQL API. Despite setting the filter to created_at greater than “2023-03-31T13:35:00Z”, they received orders from March 30th, indicating the filter wasn’t working as expected.

Resolution:
The user self-resolved the issue by discovering the correct syntax requires wrapping the date value in single quotes.

Correct Format:
created_at: '=>2023-03-31T00:00:00Z'

An image attachment was referenced showing the original query attempt. The discussion is now resolved with the proper date filtering syntax identified.

Summarized with AI on November 21. AI used: claude-sonnet-4-5-20250929.

Hello, we are trying to filter orders by date of creation in the GraphQL API and it seems that filter “created_at” it’s not working properly or we don’t know how to use it correctly.

As you can see in the attachment we are filtering for orders where the created_at value is bigger than “2023-03-31T13:35:00Z” but we received orders from the 30th.

Are we doing the query correctly? Is there anything wrong with that filter?

Thanks.
Sergio.

1 Like

Found the solution, the problem is that you need to surround the date between single quotes, for example:

created_at:>=‘2023-03-31T00:00:00Z’

5 Likes