From 20beec99fabfd0d2a407c6e5a2c51b5757e3d205 Mon Sep 17 00:00:00 2001 From: Syed Zohair Abbas Hadi <45510142+zohairhadi@users.noreply.github.com> Date: Fri, 27 Oct 2023 22:13:43 +0500 Subject: [PATCH] docs: Update subscriptions.mdx (apollographql/apollo-ios-dev#106) --- docs/source/fetching/subscriptions.mdx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/source/fetching/subscriptions.mdx b/docs/source/fetching/subscriptions.mdx index 07ffe1a4c..595345a39 100644 --- a/docs/source/fetching/subscriptions.mdx +++ b/docs/source/fetching/subscriptions.mdx @@ -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) }() ```