connectingPayload not available to add to WebSocketTransport on iOS

I’m trying to set up a Websocket transport on iOS. According to the latest docs here, I should be able to attach the authPayload to the WebSocketTransport. Unfortunately it doesn’t look like that is actually possible in Apollo v1.1.0. I’m getting this error: “Extra argument ‘connectingPayload’ in call

Would appreciate any hints!

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)
}()

Looks like the docs were outdated. The correct way to attach a config and payload is this:


let webSocketTransport: WebSocketTransport = {
    let url = URL(string: "ws://localhost:8080/websocket")!
    let webSocketClient = WebSocket(url: url, protocol: .graphql_transport_ws)
    let authPayload: JSONEncodableDictionary = ["authToken": myAuthToken]
    let config = WebSocketTransport.Configuration(connectingPayload: authPayload)
    return WebSocketTransport(websocket: webSocketClient, config: config)
}()