leebenson/graphql-with-sequelize

Using table joins for server quering

Closed this issue · 1 comments

Hi,
I would like to hear your thoughts on this

@itaied246, marktani's answer here should give you a couple of starting points.

This is called the n+1 problem, where each result requires an additional query to obtain related data. It's something that also affects REST or any other pattern where data is related to the result of previously obtained data.

It's usually solved by joins (i.e. grabbing from related tables in a single query) and/or by analysing the full GraphQL structure, and pre-empting/caching data you might request again later.

The libraries marktani suggests seem like a good place to explore further.