Skip to content

Commit

Permalink
docs: Update subscriptions.mdx (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
zohairhadi authored and gh-action-runner committed Oct 27, 2023
1 parent cb297db commit 20beec9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/source/fetching/subscriptions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ Note that this must be set **when the `WebSocketTransport` is created**. If you
let webSocketTransport: WebSocketTransport = {
let url = URL(string: "ws://localhost:8080/websocket")!
let webSocketClient = WebSocket(url: url, protocol: .graphql_transport_ws)
let authPayload = ["authToken": myAuthToken]
return WebSocketTransport(websocket: webSocketClient, connectingPayload: authPayload)
let authPayload: JSONEncodableDictionary = ["authToken": myAuthToken]
let config = WebSocketTransport.Configuration(connectingPayload: authPayload)
return WebSocketTransport(websocket: webSocketClient, config: config)
}()
```

Expand Down

0 comments on commit 20beec9

Please sign in to comment.