i have multiple type/schema in dgraph
in academicyear type, i have lookup field name “institution” that institution in institution is store the institution type uid its lookup field
can i add filter institution uid in academic year type
query:
{
usermapping(func:type(AcademicYear)){
id: uid
name
dgraph.type
institution{
uid
name
}
}
}
result:
{
“id”: “0x9770”,
“name”: “test”,
“dgraph.type”: [
“AcademicYear”
],
“institution”: [
{
“uid”: “0x976a”,
“name”: “Vels College of Institution”
}
]
}
i need solution for this issue
i need to get the academicyear type data using filter institution type uid
query {
var(func: uid(0x976a)) @filter(eq(dgraph.type, “Institution”)) {
institution as uid
}
academicYears(func: uid(institution)) @filter(eq(dgraph.type, “AcademicYear”)) {
uid
name
}
}