Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(graphql): send connection_init message during handshake
The implementation of `graphql-transport-ws` fails on the first message as it's only sent if the connection controller is in the `connected` state. For this protocol, the state is instead set to `handshake` during the first `_write()`. https://github.com/zino-hofmann/graphql-flutter/blob/02be959597f0ffe0c21a227a2d1fdb02b3f56831/packages/graphql/lib/src/links/websocket_link/websocket_client.dart#L250-L256 Without this, the connection fails with the following log: ``` flutter: Initialising connection flutter: There was an error causing connection lost: Bad state: No element flutter: Disconnected from websocket. ```
- Loading branch information