graphql_ws 0.1.1
graphql_ws: ^0.1.1 copied to clipboard
Coherent, zero-dependency, lazy, simple, GraphQL over WebSocket Protocol compliant client. Dart port of graphql-ws.
0.1.1 #
- Treat close code 1002 (Protocol Error) as non-fatal/retryable. Android emits 1002 on abrupt network disconnects, not only true protocol violations, so classifying it as fatal tore down subscriptions on every network drop.
- Normalise a transport failure to establish the connection (e.g.
dart:iothrowingSocketExceptionon a failed DNS lookup while offline) to an abnormal closure (1006) instead of propagating the raw error. A raw exception bypassedshouldRetryand killed the subscription; 1006 is non-fatal, so the retry machinery (andconnectivityAwareRetryWait's offline parking) now runs as it does for a mid-session drop. This closes a Dart-vs-JS gap: JS surfaces connection failures as close events, butdart:iothrows.
0.1.0 #
- Initial Dart port of graphql-ws (client only).
- Implements the GraphQL over WebSocket Protocol.
- Zero external dependencies. Default transport uses
dart:io.WebSocket; users can supply a customWebSocketAdapterfor other platforms (e.g. Flutter web). - Add
Client.ping([payload])— sends aPingon demand (a no-op without a live connection). Useful as a liveness probe; the matchingPongsurfaces as aPongEvent. No JS counterpart. dart:iois no longer imported into a web compile. The default connector is now resolved via a conditional export (default_connector.dart): thedart:ioconnector on native, a throwing stub on the web.defaultWebSocketConnectoron the web now throws a clearUnsupportedErrorpointing atgraphql_ws_web_socket_channel_connector, instead of failing murkily.DartIoWebSocketAdapterremains exported on native targets.