---
title: "GraphQL, meet LiveGraph: a real-time data system at scale"
description: "LiveGraph is Figma's real-time data layer on Postgres: frontend code declares GraphQL-like live queries via a React useSubscription hook, and the server keeps results updated by tailing the Postgres write-ahead log distributed over Kafka instead of polling."
url: "https://swe.quest/articles/graphql-meet-livegraph-a-real-time-data-system-at-scale-0852462beb79152e"
canonical: "https://www.figma.com/blog/livegraph-real-time-data-fetching-at-figma/"
source: "Figma"
published: "2021-10-14"
difficulty: "medium"
kind: "Case study"
reading_minutes: 11
tags: ["realtime","graphql","postgres","system-design","event-driven"]
---

# GraphQL, meet LiveGraph: a real-time data system at scale

A post on [Figma](https://swe.quest/sources/figma.md), published 2021-10-14, 11 min read, Case study. Original: [https://www.figma.com/blog/livegraph-real-time-data-fetching-at-figma/](https://www.figma.com/blog/livegraph-real-time-data-fetching-at-figma/)

## Summary

LiveGraph is Figma's real-time data layer on Postgres: frontend code declares GraphQL-like live queries via a React useSubscription hook, and the server keeps results updated by tailing the Postgres write-ahead log distributed over Kafka instead of polling. Each view is decomposed into a tree of join-free single-table subqueries. An index of active subqueries routes replication-stream changes to the right cached results, and subqueries are shared across users to cut database load. The client is isomorphic with the NodeJS server and receives ordered, exactly-once incremental updates, with permission checks and optimistic updates built in. Performance-critical parts are written in Go, a single instance currently handles about 10,000 writes/second, and open problems include sharding, thundering-herd reconnects after deploys, and pagination of live views.

Written by swe.quest, not by the author.

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

## Topics

- [Real-time systems](https://swe.quest/tags/realtime.md) (Backend & APIs)
- [GraphQL](https://swe.quest/tags/graphql.md) (Backend & APIs)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [System design](https://swe.quest/tags/system-design.md) (Architecture & design)
- [Event-driven architecture](https://swe.quest/tags/event-driven.md) (Backend & APIs)

## Prerequisites

- GraphQL basics ([easy posts on GraphQL](https://swe.quest/tags/graphql.md?difficulty=easy))
- Postgres replication ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))
- React hooks ([easy posts on React](https://swe.quest/tags/react.md?difficulty=easy))

## Keywords

LiveGraph, Figma, GraphQL, PostgreSQL, Kafka, React, Go, Node.js

## Related posts

- [Keeping it 100(x) with real-time data at scale](https://swe.quest/articles/keeping-it-100-x-with-real-time-data-at-scale-3b49e279c5a600f2.md): Figma · 2024-05-17 · Medium · 19 min read · Caching, Real-time systems, Scaling, PostgreSQL, System design
  Figma rebuilt LiveGraph, its real-time GraphQL-like subscription service over Postgres, to scale reads and database update load 100x as the database moved from one instance to vertical and horizontal shards.
- [Neon now has realtime](https://swe.quest/articles/neon-now-has-realtime-b9ed3cc150e396ae.md): Neon · 2026-10-15 · Medium · 10 min read · Real-time systems, PostgreSQL, TypeScript, React, AI for coding
  Neon Realtime, now in free public beta, turns any read-only deterministic SQL query (joins, aggregates, window functions, subqueries) into a live query whose result stays updated as data changes, running inside Postgres rather than as a separate realtime service.
- [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.
- [TanStack DB with Sync – the future of real-time UI](https://swe.quest/articles/tanstack-db-with-sync-the-future-of-real-time-ui-23c7d45a5c87b6ef.md): Neon · 2025-08-07 · Medium · 8 min read · Local-first & sync, Real-time systems, React, PostgreSQL, TypeScript
  Pairing TanStack DB with the ElectricSQL sync engine gives web apps end-to-end real-time updates and optimistic mutations, with Postgres as the source of truth.
- [Realtime: Multiplayer Edition](https://swe.quest/articles/realtime-multiplayer-edition-cca475e0a0be51ab.md): Supabase · 2022-08-18 · Medium · 8 min read · Real-time systems, Elixir & Erlang, PostgreSQL, JavaScript
  Supabase Realtime's Broadcast and Presence features are now generally available, with every feature organized around Channels that also carry Postgres change events.

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)
