Fernando Fleury
01/30/2022, 7:48 PM{
score: float;
reviewVotes: ReviewVote[]
}
And the review vote:
{
reviewId: string;
userId: string;
}
When querying the reviews
I wanted to be able to return a "virtual field" hasUserVoted
that would rely on checking whether or not a reviewVote
with its userId
exists. I was trying to figure out how to do this in an optimal way