How to Avoid the N+1 Query Problem in GraphQL and REST APIs [with Benchmarks]
The N+1 query problem is a performance issue you might face while building APIs, regardless of whether they're GraphQL or REST APIs. In fact, this problem occurs when your application needs to return a set of data that includes related nested data – for example, a post that includes comments.