zino-hofmann / graphql-flutter

A GraphQL client for Flutter, bringing all the features from a modern GraphQL client to one easy to use package.
https://zino-hofmann.github.io/graphql-flutter
MIT License
3.25k stars 620 forks source link

Fix SocketClient to close subscription on socket close #1184

Closed qbx2 closed 2 years ago

qbx2 commented 2 years ago

Closes #1183

codecov[bot] commented 2 years ago

Codecov Report

Merging #1184 (24e9678) into main (0d8a3d0) will decrease coverage by 0.10%. The diff coverage is 68.75%.

@@            Coverage Diff             @@
##             main    #1184      +/-   ##
==========================================
- Coverage   59.72%   59.61%   -0.11%     
==========================================
  Files          41       41              
  Lines        1676     1684       +8     
==========================================
+ Hits         1001     1004       +3     
- Misses        675      680       +5     
Impacted Files Coverage Δ
...l/lib/src/links/websocket_link/websocket_link.dart 0.00% <ø> (ø)
...lib/src/links/websocket_link/websocket_client.dart 80.47% <68.75%> (-1.71%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0d8a3d0...24e9678. Read the comment docs.

qbx2 commented 2 years ago

I’ll try

qbx2 commented 2 years ago

I added a test for onDone(). However, I have no idea to test onError().

vincenzopalazzo commented 2 years ago

I'm too lazy to fix the git history and the commit message! So I just cherry picked your commit https://github.com/zino-hofmann/graphql-flutter/pull/1186