Websocket Subprotocols
This section explains how you can configure Websocket subprotocols both for local development and using Cosmo Studio.
The available WebSocket subprotocols are:-
auto: This is the default subprotocol. If auto is selected, we negotiate with the subgraph for the subprotocol. The subprotocols graphql-ws and graphql-transport-ws are used for the negotiation. If the subgraph doesn't return a subprotocol, it falls back to graphql-ws.
graphql-ws
graphql-transport-ws
How to set the WebSocket subprotocol
While creating a subgraph, the WebSocket subprotocol can be set using the create subgraph command.
If the subgraph is already created, it can be updated using the update subgraph command.
Configure Subscriptions for local development
When composing a Graph locally, you can supply the subprotocol using the following configuration.
Last updated