JagaScript

Logo
1 min read

high performance graphql-to-sql queries

April 10, 2019
tags: hasura, graphql, postgres

Recently I was thinking about the fact that graphql resolvers are not designed to “know” where the data is coming from,thus is not possible to optimize a query constructing a single SQL query that uses multiple JOIN to resolve all nested field in a single DB trip. this because the parent resolver has to complete before the nested resolver can start.

Looking around I found a very interesting article by hasura where they explain how it is actually possible for them, as in their case they know upfront that the whole query is going to hit a single datastore that has all the data requested by the query.

worth taking a look 🔝

origin post: https://blog.hasura.io/architecture-of-a-high-performance-graphql-to-sql-server-58d9944b8a87/

Sharing is caring

Blog by Jaga Santagostino.
Software consultant, polyglot developer, maker of things, lifelong learner.
ReactJS Milano & milano.dev organizer