Hacker News new | ask | show | jobs
by tomnipotent 2168 days ago
> gloss over the n+1 query problem, but I find it to be a major shortcoming of the gql spec.

Why would an implementation detail like n+1 be part of the spec?

1 comments

The n+1 query problem arises from having an API that doesn't let you express the full query that you want so the server can send you back all the data in one go instead of N+1 goes. The n+1 query problem arises naturally from bad API design. That's a spec problem.
Unless I'm missing something in the conversation, this is exactly what GQL is designed to solve.