I have been trying to using expand(all) to expand edges but it’s not really working as I would expect. For example why does:
{
q(func: eq(name, "Jethro Tull"), first: 1) {
expand(_all_)
}
}
Expands the node properties, but not edges:
"data": {
"q": [
{
"_stp_id": "Artist:/m/01v1cnf",
"name": "Jethro Tull"
}
]
}
If I specify the edge:
{
q(func: eq(name, "Jethro Tull"), first: 1) {
name
<Released> (first:1) {
expand(_all_)
}
}
}
I get:
"data": {
"q": [
{
"name": "Jethro Tull",
"Released": [
{
"_stp_id": "Album:/m/0_b9kq",
"name": "The Very Best Of"
}
]
}
]
},
My schema is:
type Artist {
Released
<~Member_of>
_stp_id
date
name
length
place
type
}
type Engineer {
Engineered
_stp_id
name
type
}
type Producer {
Produced
_stp_id
name
type
}
type Album {
<~Engineered>
<~Released>
<~On>
_stp_id
date
primary_release
contributor
release_date
name
release_type
type
}
type Member {
Member_of
_stp_id
role
start
name
end
type
}
type Track {
<~Engineered>
<~Produced>
On
_stp_id
date
name
length
place
type
}
_stp_id: string @index(exact) .
_stp_label: string @index(exact) .
Engineered: [uid] @reverse @count .
Produced: [uid] @reverse @count .
Released: [uid] @reverse @count .
Member_of: [uid] @reverse @count .
On: [uid] @reverse @count .
date: string @index(exact) .
primary_release: string @index(exact) .
role: string @index(exact) .
length: float @index(float) .
start: string @index(exact) .
release_type: string @index(exact) .
type: string @index(exact) .
contributor: string @index(exact) .
release_date: string @index(exact) .
name: string @index(exact) .
end: string @index(exact) .
place: string @index(exact) .