Hasura v2.51.6 compiles GraphQL into PostgreSQL SQL
An analysis of Hasura v2 reveals how the GraphQL engine acts as a compiler that translates incoming queries and permission expressions into a single PostgreSQL SQL query using LATERAL joins and subqueries. Testing demonstrates that page-sized queries perform similarly to hand-written SQL, whereas large nested queries involving tens of thousands of rows run slower because PostgreSQL executes relationship subqueries for each parent row. Open article →