Hello,
I noticed that latest version of Dgraph (I tried to use v1.0.9 and v1.0.10-rc1) returns entity having non-reversed when use has(~edge)
.
Is this behavior is correct?
For example, define the following schema and data.
schema
name: string @index(hash) .
follow: uid @count @reverse .
data
{
set {
_:alice <name> "alice" .
_:bob <name> "bob" .
_:carol <name> "carol" .
_:alice <follow> _:carol .
_:bob <follow> _:carol .
}
}
And execute below.
{
q(func: has(~follow)) {
name
}
}
Before v1.0.9 returns carol
.
{
"data": {
"q": [
{
"name": "carol",
"uid": "0x6b"
}
]
},
"extensions": {
"server_latency": {
"parsing_ns": 25300,
"processing_ns": 3185500,
"encoding_ns": 1790700
},
"txn": {
"start_ts": 533,
"lin_read": {
"ids": {
"1": 689
}
}
}
}
}
But v1.0.9 or later version returns alice
and bob
{
"data": {
"q": [
{
"name": "alice",
"uid": "0x7"
},
{
"name": "bob",
"uid": "0x8"
}
]
},
"extensions": {
"server_latency": {
"parsing_ns": 196900,
"processing_ns": 3609300,
"encoding_ns": 1054700
},
"txn": {
"start_ts": 51
}
}
}