The issues seem specific to the following value “0001-01-01T00:00:00Z”.
I added this data and queried it back.
{
"set": [
{
"created_at": "0000-01-01T00:00:00Z"
},
{
"created_at": "0001-01-01T00:00:00Z"
},
{
"created_at": "0002-01-01T00:00:00Z"
},
{
"created_at": "0003-01-01T00:00:00Z"
},
{
"created_at": "0001-02-02T00:00:00Z"
}
]
}
Query:
{
q(func: has(created_at)) {
uid
created_at
}
}
Result:
{
"data": {
"q": [
{
"uid": "0x18",
"created_at": "0000-01-01T00:00:00Z"
},
{
"uid": "0x19",
"created_at": ""
},
{
"uid": "0x1a",
"created_at": "0002-01-01T00:00:00Z"
},
{
"uid": "0x1b",
"created_at": "0003-01-01T00:00:00Z"
},
{
"uid": "0x1c",
"created_at": "0001-02-02T00:00:00Z"
}
]
}
}
Created a github issue for this.
https://github.com/dgraph-io/dgraph/issues/5364