Eliminate database calls for reports query
Created by: Tirokk
Authored by roschaefer Merged
🍰 Pullrequest
Return empty array instead null for "not reviewed"
@mattwr18 why did you add the null check in th resolver?
Eliminate database calls for filed and reviewed
I learned map projections and list comprehensions in cypher tonight!
:tada: So much wow!
Issues
This eliminates 2n database calls for n the number of all reports.
We could bring this to a next level by optionally matching the author (in case of a post or comment) and the post (in case of a comment), both adding another n database calls to the resolver.