Content Deep Dive
Compiling GraphQL for optimal performance: going beyond Dataloader
Blog post from Hasura
Post Details
Company
Date Published
Author
Akshaya Acharya
Word Count
2,277
Language
English
Hacker News Points
-
Summary
This article discusses the architecture that allows Hasura v3 to achieve better-than-Dataloader performance across multiple data sources. It covers techniques for serving GraphQL more efficiently and includes example code to generate efficient database queries. The technique has three parts: decompose the query based on subgraphs, query compilation into efficient database queries, and execution. The article also explores the use of Dataloader and how to go beyond it for optimal performance. It provides benchmarks comparing simple dataloader approach to optimized database query using JSON variables.