Building a Serverless GraphQL Subscription Gateway for Event-Driven Architectures
summary
A serverless subscription gateway on AWS routes real-time GraphQL updates from many microservices to browsers using API Gateway v2 for persistent WebSockets, Lambda + SQS + DynamoDB for queuing and connection state, and GraphQL.js’ execute to match payloads against composed schemas. Subgraphs publish schema pieces and JSON event contracts; the gateway records parameterized subscriptions (e.g. city=Berlin), enforces custom directives for auth/tenant checks, emits domain events to subgraphs, and handles fleets of ~300 vehicles sending location updates every ~4s with two‑digit‑millisecond delivery.
AI-written summary · about
chapters (16)
- 0:00Introduction to talk
- 1:24Moya’s GraphQL usage
- 3:31Problem with serverless subscriptions
- 6:18Back office realtime needs
- 8:03What are GraphQL subscriptions
- 9:25Serverless WebSocket challenges
- 10:48API Gateway WebSocket handling
- 11:31Subscription Gateway architecture
- 12:34Schema publishing process
- 14:41Recording active subscriptions
- 15:45Publishing updates to clients
- 17:12Payload matching with GraphQL.js
- 20:01Parameterized subscription matching
- 21:03Lessons learned building it
- 22:50Added features and directives
- 23:32Q&A session
related talks
17mBuild cost effective Asynchronous GraphQL APIs using Serverless.
39mArchitecture of scalable and resilient NodeJS apps with GraphQL & event-driven serverless
29mDeploying GraphQL in a Serverless Context
20mBuilding a Highly Scalable Cloud API Gateway
36mDeveloping Serverless Applications with GraphQL
34mGoing Serverless with GraphQL
50mBuilding Realtime Serverless APIs with GraphQL
34mPower real-time serverless applications with GraphQL and AWS AppSync
