News for hackers. Stuff that matters.
Re:Debugging GraphQL N+1 Issues with Open Source Tracing Tools by troupo on Tuesday July 04, 2023 @01:45PM (#36590097)
Dataloaders replace N+1 with E queries (where E is the number of separate entity types to fetch) and an in-memory merging of all datasets (huge if you're not careful).

They are a solution, but not necessarily a good one. And GraphQL doesn't lend itself to goos solutions.

Re:Debugging GraphQL N+1 Issues with Open Source Tracing Tools by swid on Tuesday July 04, 2023 @01:53PM (#36590229)
N+1 only makes sense for E=2. For each parent in the list, fetch the child’s data. If there were multiple children, or if the children had their own children fetched 1 at a time, it would no longer be N+1.

So I think 1+1 (or 1+N/batch size) is still correct.