File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -34,11 +34,11 @@ Future<QueryResult<TParsed>> fetchMoreImplementation<TParsed>(
34
34
final data = fetchMoreOptions.updateQuery (
35
35
previousResult.data,
36
36
fetchMoreResult.data,
37
- )! ;
37
+ );
38
38
39
39
fetchMoreResult.data = data;
40
40
41
- if (originalOptions.fetchPolicy != FetchPolicy .noCache) {
41
+ if (originalOptions.fetchPolicy != FetchPolicy .noCache && data != null ) {
42
42
queryManager.attemptCacheWriteFromClient (
43
43
request,
44
44
data,
Original file line number Diff line number Diff line change @@ -372,8 +372,8 @@ class SocketClient {
372
372
}
373
373
374
374
void onConnectionLost ([Object ? e]) async {
375
- var code = socketChannel! .closeCode;
376
- var reason = socketChannel! .closeReason;
375
+ var code = socketChannel? .closeCode;
376
+ var reason = socketChannel? .closeReason;
377
377
378
378
await _closeSocketChannel ();
379
379
if (e != null ) {
@@ -502,6 +502,7 @@ class SocketClient {
502
502
)
503
503
: waitForConnectedStateWithoutTimeout;
504
504
505
+ sub? .cancel ();
505
506
sub = waitForConnectedState.listen ((_) {
506
507
final Stream <GraphQLSocketMessage > dataErrorComplete = _messages.where (
507
508
(GraphQLSocketMessage message) {
You can’t perform that action at this time.
0 commit comments