apollographql / subscriptions-transport-ws

:arrows_clockwise: A WebSocket client + server for GraphQL subscriptions
https://www.npmjs.com/package/subscriptions-transport-ws
MIT License
1.52k stars 342 forks source link

No payload returned in connection callback after connection ack #806

Closed TrasheRacer closed 2 years ago

TrasheRacer commented 4 years ago

Hi, I think I've found a bug in subscriptions-transport-ws/src/client.ts at line 633.

if (this.connectionCallback) {
    this.connectionCallback();
}

Shouldn't this be passing in the payload of the connection_ack message? According to the docs for the protocol, this message has an optional payload which should be handled in this callback. I'm happy to fix this.