Sure - I’m on Dgraph version : v1.2.1
I’ve now found it on a couple of things, not just dates:
{
q(func:type(Hours)) @filter(gt(hours.tracked,"2020-01-01")) {
hours.tracked
}
}
Returns …
{
"data": {
"q": []
},
"extensions": {
"server_latency": {
"parsing_ns": 137800,
"processing_ns": 11714900,
"encoding_ns": 16300,
"assign_timestamp_ns": 2643200,
"total_ns": 14972200
},
"txn": {
"start_ts": 774724
},
"metrics": {
"num_uids": {
"dgraph.type": 0,
"hours.tracked": 0
}
}
}
}
But:
{
q(func:gt(hours.tracked,"2020-01-01")) {
hours.tracked
}
}
Returns …
{
"data": {
"q": [
{
"hours.tracked": "2020-01-15T00:00:00Z"
},
{
"hours.tracked": "2020-01-22T00:00:00Z"
},
{
"hours.tracked": "2020-01-31T00:00:00Z"
},
{
"hours.tracked": "2020-01-24T00:00:00Z"
},
{
"hours.tracked": "2020-01-28T00:00:00Z"
},
{
"hours.tracked": "2020-02-21T00:00:00Z"
},
{
"hours.tracked": "2020-01-22T00:00:00Z"
} ...
I have a type Hours:
type Hours {
hours.annul
hours.annulText
hours.bill
hours.billText
hours.comment
hours.created
hours.hold
hours.holdText
hours.hours
hours.id
hours.query
hours.queryText
hours.status
hours.tracked
hours.updated
employee
}
In which hours.tracked is a datetime indexed on day.