Real-Time GraphQL Subscriptions in React & Apollo Client Without a Backend
Learn how to connect Apollo Client or URQL to hosted real-time GraphQL subscriptions over WebSocket using Playground API.

Real-Time GraphQL Subscriptions in React & Apollo Client Without a Backend
Setting up GraphQL Subscriptions on the client usually requires an elaborate Apollo Server or GraphQL Yoga backend with a Redis PubSub adapter and a WebSocket transport server (graphql-ws).
When you're building a UI prototype—like a live feed, collaborative task board, or trading ticker—setting up that infrastructure just to see if your React components update in real time slows you down.
Playground API now provides hosted GraphQL Subscriptions over WebSocket linked directly to stateful sandbox mutations!
1. The GraphQL Subscription Schema
Playground API exposes reactive subscription hooks for all standard resources:
2. Connecting with Apollo Client & graphql-ws
Here is how you set up Apollo Client with WebSocket link transport:
3. Consuming Subscriptions in a React Component
4. Triggering Mutations & Live Updates
Whenever you (or another test runner) fire a GraphQL mutation or a standard REST POST /posts request in your session, Playground API broadcasts the event over the graphql-ws link in real time!
Try it in the interactive GraphQL Studio:
Try Playground API in Your Own App
Stateful mock REST & GraphQL API with private sandbox overlays.