graphql-subscriptions

JSON →
library 3.0.0 ·javascript
verified Jun 7, 2026

GraphQL subscriptions is the official Apollo library for adding real-time capabilities to any GraphQL server via a PubSub pattern. Version 3.0.0 is stable, actively maintained, and ships TypeScript types. It works with any GraphQL.js-compatible server and client (not just Apollo). The package provides a lightweight PubSub implementation (EventEmitter-based for demos) and a `withFilter` helper for per-subscriber filtering. For production, you must swap the default PubSub for a store-backed implementation (e.g., Redis). It requires `graphql` ^15.7.2 or ^16 as a peer dependency and `es2018.asynciterable` in TypeScript configuration.