Subscriptions
Last updated
Was this helpful?
Last updated
Was this helpful?
Zeus supports out-of-the-box and is compatible with many popular GraphQL servers.
Two implementations are supported:
graphql-ws: the modern WebSocket-based transport, implemented by . It is also the standard
legacy (default): a transport based on raw WebSockets
To use as your subscription transport you'll need to do the following:
If you want to use legacy, use --subscriptions legacy
instead. You may need to install depending on your setup.
No matter what implementation you chose, the usage remains the same:
If you need to unsubscribe from a subscription (e.g. you are developing as Single Page App), you can do it as follows:
While you may use wsChain('query')
or wsChain('mutation')
,