I have the data like this:
_:p1 <dgraph.type> "Person" .
_:m1 <dgraph.type> "Mobile" .
_:m2 <dgraph.type> "Mobile" .
_:p1 <name> "Steven" .
_:m1 <name> "18001" .
_:m2 <name> "18002" .
_:p1 <mobile> _:m1 (edge_time=2019-01-01T00:00:00) .
_:p1 <mobile> _:m2 (mob_type="contacts") .
and schema like this:
type Person {
name
mobile
}
type Mobile {
name
<~mobile>
}
name: string @index(term) .
mobile: [uid] @reverse .
these are my query and result:
{
q(func: eq(name,"Steven")) {
mobile @facets{
name
}
}
}
"data": {
"q": [
{
"mobile": [
{
"name": "18001"
},
{
"name": "18002"
}
],
"mobile|edge_time": {
"0": "2019-01-01T00:00:00Z"
},
"mobile|mob_type": {
"1": "contacts"
}
}
]
}
I think it should be
"data": {
"q": [
{
"mobile": [
{
"name": "18001",
"mobile|edge_time": "2019-01-01T00:00:00Z"
},
{
"name": "18002",
"mobile|mob_type": "contacts"
}
]
}
]
}
like what I learned and try used the official documents
if I did anything wrong, please point it out. I will be appreciated about it.