Nov 1 · 1 min read
Echoing Brian Mearns’ comment, I find I’m a bit biased since I’ve recently come to work with Postgraphile (GraphQL for PostgreSQL), which solves precisely this problem. There is no N+1 since the whole graph query is viewed in total, not per level. Therefore under the hood for the article’s example, you get a single, elegant JOIN with all the performance and efficiency benefits inherent to that. I can’t help but think there’s a market for a normalized (see what I did there?) way of mapping graph queries to relational databases in general.