high performance graphql-to-sql queries
April 10, 2019 | 1 min read
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 🔝
Blog by Jaga Santagostino.
Software consultant, polyglot developer, maker of things, lifelong learner.