How to user filter with variable?

I’m having trouble getting the results I want with your current query. I believe my explanation may have been insufficient, so I wanted to clarify.

My schema is set up like this:

What I’m trying to do is get the score for each post based on the number of followers of the author who liked that post. Specifically, I’m using the count function with the ~liked predicate, filtered by the UID of the follower.

so with following query. I can get one the score I want about one specific post.

{
	var(func: eq(post_id,post_01)){
		post_id
    ~liked{
			liked_user as  user_id
  	}
    ~authored{
			 ~follows{
				follower as user_id
      }
    }
  }
  var(func: uid(liked_user))@filter(uid(follower)){
  fol_like as user_id
  }
  q(func: eq(post_id,post_01)){
    post_id
    count(~liked)
    ~authored{
      score : count(~follows @filter(uid(fol_like)))
    }
	}
}

However, However, I’m not just looking for the score of one post. I want to calculate the score for every post that I select. Is it possible? Thanks for your help.

​ ​

2 3 / 3

​ ​