Urql: GraphQL Subscriptions

Created on 28 Jun 2018  路  2Comments  路  Source: FormidableLabs/urql

Looking at the todos for the project, there is nothing around subscriptions.

Are there any plans to add subscription support or at least giving a pointer for if you need subscriptions do not recommend this project?

Most helpful comment

Yes :tada: It's coming in the next urql release, urql v0.3! :100: https://github.com/FormidableLabs/urql/pull/72

It'll be usable via a "subscription exchange". Exchanges are like links in Apollo but build our fundamental query pipeline where any flow of queries might be handled/redirected/altered. The subscription exchange will be adaptable so that it's agnostic to the transport layer used, as there is no standard for GraphQL subscriptions via websockets / other async transport protocols.

More info about how it's used can be found here: https://github.com/FormidableLabs/urql/pull/75

There'll also be support for using Apollo Links as urql exchanges handling requests, so you could also directly plug Apollo's request + subscription handling into urql in the future: https://github.com/kitten/urql-exchange-apollo

I'll leave this issue open so that we can track it for the release

All 2 comments

Yes :tada: It's coming in the next urql release, urql v0.3! :100: https://github.com/FormidableLabs/urql/pull/72

It'll be usable via a "subscription exchange". Exchanges are like links in Apollo but build our fundamental query pipeline where any flow of queries might be handled/redirected/altered. The subscription exchange will be adaptable so that it's agnostic to the transport layer used, as there is no standard for GraphQL subscriptions via websockets / other async transport protocols.

More info about how it's used can be found here: https://github.com/FormidableLabs/urql/pull/75

There'll also be support for using Apollo Links as urql exchanges handling requests, so you could also directly plug Apollo's request + subscription handling into urql in the future: https://github.com/kitten/urql-exchange-apollo

I'll leave this issue open so that we can track it for the release

v1 is released now which means this issue was resolved / is out-of-date 馃憣

Some docs and a proper announcement for v1 are still in progress in pending. It's completely usable so far but the API has changed, so I have to ask for some more patience, but everything will be ready quite soon 鉁岋笍

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wodnjs6512 picture wodnjs6512  路  3Comments

alexraginskiy picture alexraginskiy  路  3Comments

narinluangrath picture narinluangrath  路  3Comments

frederikhors picture frederikhors  路  3Comments

dotansimha picture dotansimha  路  4Comments