I want to calculate how many points a team member has given in the day. The query below works well if the user already has given any points but it returns null in case the user didn’t given a point in the day.
let team = teams.byId(123) let giver = team_members .byTeam(team) .where(.user.email == "test.com").first() let givenPointsToday = given_points .byGiver(giver) .where(.team == team && .date == Date.today()) .reduce((sum, givenPoint) => sum + givenPoint.amount)
So, to achieve that I have to run some extra code inside. of the query which is not the best… I’m windering if this is something that could be added again in FQL. Thank you!