You can use GraphQLWebSocket as a standalone client or with the query-builder or in combination with SwiftGraphQLClient.
Using WebSocketExchange
To create a subscription request on the client, you need to useWebSocketExchange
. WebSocketExchange
depends on the GraphQLWebSocket
client that you may further modify to suit your needs.
Using GraphQLWebSocketClient
In case you don’t want to go all-in on SwiftGraphQL, you can use just the WebSockets implementation. It doesn’t depend on any other parts of the codebase and strictly follows the GraphQL over WebSocket protocol.SwiftGraphQL
library and make a selection, you can also automatically encode queries and decode responses.