---
title: "GraphQL is now available in Supabase"
description: "Supabase has made GraphQL generally available through pg_graphql, an open source PostgreSQL extension that reflects tables, columns and foreign keys into GraphQL types, fields and relations, queryable from SQL or over HTTP."
url: "https://swe.quest/articles/graphql-is-now-available-in-supabase-1d65691e837f8256"
canonical: "https://supabase.com/blog/graphql-now-available"
source: "Supabase"
published: "2022-03-29"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 6
tags: ["graphql","postgres","api-design","performance"]
---

# GraphQL is now available in Supabase

A post on [Supabase](https://swe.quest/sources/supabase.md), published 2022-03-29, 6 min read, Announcement. Original: [https://supabase.com/blog/graphql-now-available](https://supabase.com/blog/graphql-now-available)

## Summary

Supabase has made GraphQL generally available through pg\_graphql, an open source PostgreSQL extension that reflects tables, columns and foreign keys into GraphQL types, fields and relations, queryable from SQL or over HTTP. Authorization is handled by Postgres itself: exposed types and introspection are filtered by the JWT's SQL role, and row level security applies automatically. Performance comes from transpiling every GraphQL query into exactly one SQL query, which avoids N+1 problems and duplicated join data, plus caching transpiled queries as prepared statements and making all operations bulk. On Free Plan hardware this yields about 377 requests/s via the API and 656 queries/s via SQL, and a HackerNews clone built with The Guild demonstrates the stack.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [GraphQL](https://swe.quest/tags/graphql.md) (Backend & APIs)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [API design](https://swe.quest/tags/api-design.md) (Backend & APIs)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)

## Prerequisites

- GraphQL basics ([easy posts on GraphQL](https://swe.quest/tags/graphql.md?difficulty=easy))
- PostgreSQL roles and permissions ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))
- Row level security ([easy posts on Security](https://swe.quest/tags/security.md?difficulty=easy))

## Keywords

pg\_graphql, Supabase, PostgreSQL, GraphQL, The Guild, Row Level Security, Relay

## Related posts

- [pg\_graphql: A GraphQL extension for PostgreSQL](https://swe.quest/articles/pg-graphql-a-graphql-extension-for-postgresql-3a34efbe6d730fc2.md): Supabase · 2021-12-03 · Medium · 4 min read · GraphQL, PostgreSQL, API design
  pg\_graphql is an open-source PostgreSQL extension, written in C and SQL, that reflects a GraphQL schema from existing tables and resolves queries entirely inside the database.
- [pg\_graphql v1.0](https://swe.quest/articles/pg-graphql-v1-0-5a4770d60b17d945.md): Supabase · 2022-12-16 · Medium · 5 min read · GraphQL, PostgreSQL, Rust, Performance engineering
  pg\_graphql, a PostgreSQL extension that compiles GraphQL requests into a single SQL query, reaches 1.0 with a SemVer backwards-compatibility guarantee.
- [How pg\_graphql works](https://swe.quest/articles/how-pg-graphql-works-70dff1dd9d5a0c27.md): Supabase · 2024-01-24 · Medium · 9 min read · GraphQL, PostgreSQL, Rust, Compilers
  pg\_graphql is a Rust-based Postgres extension that reflects the SQL schema as a GraphQL schema and serves queries through a \`graphql.resolve\` SQL function, with no separate server.
- [pg\_graphql: Postgres functions now supported](https://swe.quest/articles/pg-graphql-postgres-functions-now-supported-279553dc083ab4d8.md): Supabase · 2023-12-12 · Medium · 4 min read · GraphQL, PostgreSQL, API design
  pg\_graphql 1.4+ reflects Postgres user-defined functions into the GraphQL schema, giving custom SQL logic a GraphQL entry point.
- [SQL or NoSQL? Why not use both (with PostgreSQL)?](https://swe.quest/articles/sql-or-nosql-why-not-use-both-with-postgresql-98c239e2ff7e761c.md): Supabase · 2022-11-24 · Medium · 12 min read · PostgreSQL, SQL, Databases
  PostgreSQL's JSONB columns let an app store nested, variable-length data (here, a daily food, water and exercise log) as a single row instead of spreading it across several normalized tables, while keeping SQL available for analysis.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
