Skip to content

Eliminate database calls for reports query

Hannes Heine requested to merge pr2435head into pr2435base

Created by: Tirokk

roschaefer 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.

Before 2019-12-06-022419_1920x1080_scrot

After 2019-12-06-022140_1920x1080_scrot

Merge request reports