I have the following schema:
type User {
id: String! @id
name: String! @search(by: [hash,term])
followings: [User]
followers: [User] @hasInverse(field: followings)
...
}
I want to query the list of friends, so I want to execute the following query:
// Friend logic: In my followings list, those users who also follow me.
query($id: String!) {
getUser(id: $id){
id
friends: followings(
filter:{
followings:{
eq: { id: $id }
}
}
){
id
name
}
}
}
But I did not find followings in UserFilter, it only has some non-predicate fields.
filter:{
followings:{
eq: { id: $id }
}
}
This usage doesn’t work.