Set Up GraphQL Subscriptions with Urql

Share this video with your friends

Send Tweet

In this lesson, we set up our urql client with GraphQL subscriptions.

Urql doesn't support subscriptions by default. We import the subscriptionExchange along with defaultExchanges to pass to our urql client. Next, we import SubscriptionClient from subscriptions-transport-ws which takes a websocket URL.