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…

How to use WebSockets in Angular

Using WebSockets in Angular enables real-time bidirectional communication between client and server for live updates and messaging. As the creator of CoreUI with over 12 years of Angular experience since 2014, I’ve implemented WebSocket connections in numerous real-time applications. Angular integrates with WebSockets using RxJS observables providing reactive streams for incoming messages and connection management. This approach enables real-time features like chat, notifications, live data feeds, and collaborative editing.

Read More…

How to use Vue with WebSockets

Implementing WebSockets in Vue enables real-time, bidirectional communication for live updates, chat applications, and streaming data. As the creator of CoreUI with over 12 years of Vue.js experience since 2014, I’ve built real-time dashboards with WebSocket connections. Vue’s reactivity system works seamlessly with WebSocket messages, automatically updating the UI when new data arrives. This approach creates responsive applications with live data synchronization without polling.

Read More…

How to use Vue with GraphQL subscriptions

GraphQL subscriptions enable real-time data updates in Vue applications through WebSocket connections for live queries and data streaming. With over 12 years of Vue.js experience since 2014 and as the creator of CoreUI, I’ve implemented real-time GraphQL features in enterprise dashboards. Apollo Client provides Vue integration with subscription support, automatically updating reactive queries when server data changes. This approach creates live applications with automatic data synchronization without manual WebSocket management.

Read More…

How to use Socket.IO in Node.js

Real-time bidirectional communication requires WebSockets, but handling browser compatibility and reconnection logic manually is complex. With over 12 years of Node.js development experience since 2014 and as the creator of CoreUI, I’ve built numerous real-time features with Socket.IO. Socket.IO is a library that provides WebSocket functionality with automatic fallbacks, reconnection, and room-based broadcasting. This approach simplifies real-time communication compared to native WebSockets while adding powerful features like namespaces and middleware.

Read More…

How to implement real-time notifications in Node.js

Real-time notifications keep users informed of important events without requiring page refreshes or polling, creating responsive and engaging applications. As the creator of CoreUI with over 12 years of Node.js experience since 2014, I’ve implemented notification systems for numerous enterprise dashboards. A real-time notification system uses WebSockets to maintain persistent connections and push notifications instantly when events occur. This approach provides immediate user feedback for actions like new messages, status updates, or system alerts.

Read More…

How to build a chat app with WebSockets in Node.js

Real-time chat applications require bidirectional communication where the server can push messages to clients instantly without polling. With over 12 years of Node.js development experience since 2014 and as the creator of CoreUI, I’ve built numerous real-time applications with WebSockets. WebSockets provide full-duplex communication channels over a single TCP connection, perfect for chat, notifications, and live updates. The native ws library offers a lightweight WebSocket implementation for Node.js without the overhead of frameworks.

Read More…
Subscribe to our newsletter
Get early information about new products, product updates and blog posts.
How to Open Link in a New Tab in HTML?
How to Open Link in a New Tab in HTML?

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 check if a string is a number in JavaScript
How to check if a string is a number in JavaScript

Answers by CoreUI Core Team