Guarding against N+1 issues in GraphQL

added by DotNetKicks
3/13/2019 11:43:29 AM

516 Views

The N+1 query problem is a common one to encounter during software development, particularly with ORM's (Object Relational Mappers) and their capabilities around lazy loading. A quick example looks like Unless you're careful the lazy loading of the Customer of the Order results in a database query, for 100 orders this would result in 101 database calls, one per Customer and one extra for the orders (hance the name N+1).


0 comments