Hacker News new | ask | show | jobs
by gavinray 1124 days ago

  > one of the reasons I was told it was great was because it solves/avoids the n+1 problem
So, the thing about GraphQL is that it's a _specification_, in the same way that REST or gRPC are specifications.

There's nothing inherent in either GraphQL or REST that admits or prevents the N+1 problem. You have endpoints with business logic (or in GQL's case, "resolvers") and there's no telling what's inside of those methods code.

It's true that GraphQL was built to integrate with tools like a "Dataloader" to solve "N+1", but you could just as validly be using a Dataloader in your REST or gRPC API endpoints.