Home / Companies / Supabase / Blog / Post Details
Content Deep Dive

pg_graphql: A GraphQL extension for PostgreSQL

Blog post from Supabase

Post Details
Company
Date Published
Author
Oliver Rice
Word Count
925
Company Posts That Month
13
Language
English
Hacker News Points
431
Summary

Today, we are open-sourcing pg_graphql, a native PostgreSQL extension that adds GraphQL support to the database server without requiring any external services. This extension inspects an existing PostgreSQL schema and reflects a GraphQL schema with resolvers that are performant, always up-to-date, compliant with best practices, serverless, and open source. The Supabase stack is centered around PostgreSQL as the single source of truth, so pg_graphql was designed to be SQL-centric. It runs in the database and can be exposed over HTTP using existing PostgREST deployments' RPC functionality. This approach reduces memory requirements by 525 TB/hours every month, saving both money and resources. As a native PostgreSQL extension, pg_graphql is written in C and SQL, with each GraphQL query parsed, validated, and transpiled to SQL within the database. It benefits from PostgreSQL's built-in solutions for common challenges like caching, errors, bad data, authorization, and strong ACID guarantees.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Vector Search 1 210 34 20 +18%