-

WG Day:

Menlo Park, California
Back to Schedule

Tobbe Lundberg

@live GraphQL in Practice: Postgres-to-React Realtime Data Sync

Ana of California
Production InsightRegular Scale

Session description

We built a real-time system for Postgres→React sync using a `LISTEN/NOTIFY` Postgres trigger, GraphQL `@live` queries, a React hook and a custom ORM-inspired GraphQL query builder. Starting from ESP32 microcontroller devices sending MQTT messages and a Node/Postgres backend, we moved from polling to a stand-alone PoC with Yoga, Prisma triggers, and a custom `useLiveQuery` hook. After proving that the PoC was working we integrated with all our existing full-stack apps. So now we have low-latency UI updates, reusable cross-app logic, and easier extension for new sensor values. Great UX and excellent DX. TOC - Title & minimal intro - Goals (What We Needed) - Existing System (What We Had) - Attempts & Why They Failed - Solution Overview - Postgres `LISTEN/NOTIFY` - `useLiveQuery` React hook - Yoga and Apollo `@live` integration - GraphQL query builder - GraphQL SDL generator - GraphQL resolver generator - Demo / Results - Tradeoffs, Lessons & Next Steps - Q&A


Session speakers

Tobbe Lundberg

Cedar Software AB, -

Regular Scale

Tech Lead at Aerafarms. Maintainer of CedarJS. Lives out in the middle-of-nowhere in Sweden. Likes everything on two wheels and loves to travel.

Get your ticket

Join two transformative days of expert insights and innovation to shape the next decade of APIs!

Get tickets
COMMUNITYDEVELOPER EXPERIENCEAPIsTOOLS & LIBRARIESCOMMUNITYDEVELOPER EXPERIENCEAPIsTOOLS & LIBRARIES
OPEN SOURCEFEDERATIONECOSYSTEMSTRACING & OBSERVABILITYOPEN SOURCEFEDERATIONECOSYSTEMSTRACING & OBSERVABILITY
BEST PRACTICESWORKSHOPSSCHEMASSECURITYBEST PRACTICESWORKSHOPSSCHEMASSECURITY