Next.js starter your AI actually understands. Ship internal tools in days not weeks. Pre-order $199 $499 → [Get it now]

How to add GraphQL subscriptions in Node.js

GraphQL subscriptions enable real-time data updates by maintaining persistent WebSocket connections between clients and servers for push-based event notifications. As the creator of CoreUI, a widely used open-source UI library, I’ve implemented real-time features in collaborative dashboards throughout my 12 years of development experience since 2014. The most effective approach is using graphql-ws library with PubSub pattern for managing subscriptions and broadcasting events to connected clients. This method provides standards-compliant WebSocket protocol, automatic connection management, and scalable event distribution for real-time applications.

Read More…
Subscribe to our newsletter
Get early information about new products, product updates and blog posts.
How to get element ID in JavaScript
How to get element ID in JavaScript

How to check if an element is visible in JavaScript
How to check if an element is visible in JavaScript

How to convert a string to boolean in JavaScript
How to convert a string to boolean in JavaScript

How to Hide Scrollbar with CSS
How to Hide Scrollbar with CSS

Answers by CoreUI Core Team