---
title: "Understanding the N+1 Problem in GraphQL (and Why It’s Not Just GraphQL)"
url: https://daily.dev/posts/understanding-the-n-1-problem-in-graphql-and-why-it-s-not-just-graphql--ub9yybdyf
source_url: https://wundergraph.com/blog/graphql-n-plus-1-problem
type: article
source: "WunderGraph"
published: 2026-07-22T17:13:39.600Z
updated: 2026-07-22T17:14:03.362Z
tags: ["graphql"]
reading_time: 13
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Understanding the N+1 Problem in GraphQL (and Why It’s Not Just GraphQL)

**[WunderGraph](https://daily.dev/sources/wundergraph)** · 13 min read · 0 upvotes · 0 comments

## Summary

The N+1 problem — one query for a list plus one query per item — is a general data-access anti-pattern that appears in REST, monolithic GraphQL, and federated GraphQL, not just GraphQL. In resolver-based GraphQL, the default execution model makes it easy to introduce accidentally because sibling resolvers don't coordinate fetches. In federated GraphQL, router-level batching (e.g., WunderGraph's breadth-first loading) can reduce cross-subgraph fan-out, but subgraphs can still reintroduce N+1 if their `__resolveReference` resolvers fetch one record at a time. DataLoader is the most common fix — batching `.load()` calls within a scheduling window — but joins, ORM eager loading, denormalized views, or set-based SQL queries are often better for predictable access patterns. Detection requires correlating a GraphQL operation with backend call counts via database logs, distributed traces, or APM tools, since router traces may look fine while per-entity fan-out hides inside subgraphs.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://wundergraph.com/blog/graphql-n-plus-1-problem>

---

Tags: [#graphql](https://daily.dev/tags/graphql)

[View this post on daily.dev](https://daily.dev/posts/understanding-the-n-1-problem-in-graphql-and-why-it-s-not-just-graphql--ub9yybdyf)
