Check specify edg between nodes


i want to wirte a query to check whether the ‘friend’ is exists between A and B
I have tried

node (func: eq(name 'A')){
uid
friend @filter(eq(friend,'B')){
uid
}
}

but nothing happened

I think @filter(eq(friend,‘B’)) should be @filter(eq(name,‘B’)) , you’re filtering on the name field of “node B”.

1 Like