On Dgraph I get different results for queries, that should return the same result.
For the DQL Query
{
user(func: has(name)) {
name
email
}
}
I get the response
{2 items
data:{1 item
user:[2 items
0:{2 items
name:"Bastin"
email:"paintgun_test@current.com"
}
1:{2 items
name:"Bastin"
email:"paintgun_test@current.com"
}
]
}
extensions:{3 items
server_latency:{5 items
parsing_ns:73296
processing_ns:1964700
encoding_ns:51482
assign_timestamp_ns:1213398
total_ns:3435353
}
txn:{2 items
start_ts:47868611
hash:"532c654fd0f4ebc463460b3e6dddc444ced5f5fc95037caaca0d0c86865ed536"
}
metrics:{1 item
num_uids:{3 items
_total:4
email:2
name:2
}
}
}
}
For the graphql query:
query MyQuery {
queryUser {
name
email
id
spaces {
id
}
}
}
I get
{
"data": {
"queryUser": [
{
"name": "Bastin",
"email": "Bastin@we.be",
"id": "0x1a4c4ba7c0",
"spaces": []
}
]
},
"extensions": {
"touched_uids": 4,
"tracing": {
"version": 1,
"startTime": "2023-04-08T20:18:51.654328696Z",
"endTime": "2023-04-08T20:18:51.655804953Z",
"duration": 1476212,
"execution": {
"resolvers": [
{
"path": [
"queryUser"
],
"parentType": "Query",
"fieldName": "queryUser",
"returnType": "[User]",
"startOffset": 187532,
"duration": 1284447,
"dgraph": [
{
"label": "query",
"startOffset": 232491,
"duration": 1237743
}
]
}
]
}
}
}
}