4 ms·
The issue mentioned in that post - the fact that this query generates 6 sql queries instead of 2 {allPosts(first:5){title}} is a limitation of the implementat
by sorenbs 10y ago
The issue mentioned in that post - the fact that this query generates 6 sql queries instead of 2
{allPosts(first:5){title}}
is a limitation of the implementation and not inherent to the architecture. We spent a lot of time optimising these cases for graph.cool and the result is that we actually have a more scalable system by issuing a few simple sql queries instead of one giant join. It does open the door for the result to be internally inconsistent, but that is no different from querying a bunch of cached rest endpoints.
- ruslan_talpa 10y agoYou are doing the job of the database query planner. A good join (using indexes) will always beat your 3 simple sequential queries. This mindset i think is due to mysql 4.x which sucked at joins.