Hey Dgraphers,
I’m a newcomer in the Dgraph community!
I’ve been browsing the doc and watching tutorials and I still can figure why my expand(_all_)
does not return results.
I’m aware that a dgraph.type
must be assigned for results to be expanded.
Here’s the actual issue:
query {
q(func: type(Therapist)) {
firstname
uid
dgraph.type
}
}
{
"data": {
"q": [
{
"uid": "0x4e22",
"firstname": "Max-Antoine",
"dgraph.type": [
"Therapist"
]
}
]
},
"extensions": {
"server_latency": {
"parsing_ns": 225300,
"processing_ns": 9474800,
"encoding_ns": 33300,
"assign_timestamp_ns": 30056100,
"total_ns": 40505900
},
"txn": {
"start_ts": 51460
},
"metrics": {
"num_uids": {
"_total": 3,
"dgraph.type": 1,
"firstname": 1,
"uid": 1
}
}
}
}
Same with expand
, no result:
query {
q(func: type(Therapist)) {
expand(_all_)
}
}
{
"data": {
"q": []
},
"extensions": {
"server_latency": {
"parsing_ns": 792700,
"processing_ns": 59772200,
"encoding_ns": 38600,
"assign_timestamp_ns": 39873100,
"total_ns": 104427100
},
"txn": {
"start_ts": 51467
},
"metrics": {
"num_uids": {
"Therapist.agreements": 1,
"Therapist.airtable_id": 1,
"Therapist.certified": 1,
"Therapist.creation": 1,
"Therapist.description": 1,
"Therapist.email": 1,
"Therapist.expiration": 1,
"Therapist.firstname": 1,
"Therapist.languages": 1,
"Therapist.lastname": 1,
"Therapist.offices": 1,
"Therapist.payment_types": 1,
"Therapist.phone": 1,
"Therapist.photo": 1,
"Therapist.price": 1,
"Therapist.slug": 1,
"Therapist.socials": 1,
"Therapist.subscription": 1,
"Therapist.symptoms": 1,
"Therapist.therapies": 1,
"Therapist.timetable": 1,
"_total": 21,
"dgraph.type": 0
}
}
}
}
I would expect the various predicates to be displayed (firstname, lastname…) but it’s an empty result.
I see dgraph.type
at the very end that says “0” and I suppose it might be related.
Thanks so much for giving a hand to a newcomer, I will very much appreciate a community support