I’ve been working with filtering the shipments
query by order_date_from
and order_date_to
, and I’m confused about what exactly those values refer to.
Their type is specified as ISODateTime
, so I would expect them to be straight-up timestamps defining the boundaries of the query, but that doesn’t seem to be quite how they operate. In fact, requesting an order_date_from
of 2020-08-03 00:00:00
and an order_date_to
of 2020-08-04 00:00:00
gets me shipments whose order dates range from 2020-08-03T20:47:37+00:00
to 2020-08-04T23:09:48+00:00
.
For reference, this is the query I’m using:
query getShipments($cursor: String) {
shipments(order_date_from: "2020-08-03 00:00:00", order_date_to: "2020-08-04 00:00:00") {
data(after: $cursor) {
pageInfo {
hasNextPage
endCursor
}
edges {
node {
id
order_id
created_date
order {
id
order_date
}
}
}
}
}
}
After paginating through all of the results from that query, the value of order.order_date
ranges as I mentioned above.
I thought at first that the parameter might be treated as a simple date which is exclusive on the from
and inclusive on the to
, but that doesn’t quite make sense with the results I’m seeing, as that wouldn’t return any shipments with a date of 2020-08-03.