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>(
3434 final data = fetchMoreOptions.updateQuery (
3535 previousResult.data,
3636 fetchMoreResult.data,
37- )! ;
37+ );
3838
3939 fetchMoreResult.data = data;
4040
41- if (originalOptions.fetchPolicy != FetchPolicy .noCache) {
41+ if (originalOptions.fetchPolicy != FetchPolicy .noCache && data != null ) {
4242 queryManager.attemptCacheWriteFromClient (
4343 request,
4444 data,
Original file line number Diff line number Diff line change @@ -372,8 +372,8 @@ class SocketClient {
372372 }
373373
374374 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;
377377
378378 await _closeSocketChannel ();
379379 if (e != null ) {
@@ -502,6 +502,7 @@ class SocketClient {
502502 )
503503 : waitForConnectedStateWithoutTimeout;
504504
505+ sub? .cancel ();
505506 sub = waitForConnectedState.listen ((_) {
506507 final Stream <GraphQLSocketMessage > dataErrorComplete = _messages.where (
507508 (GraphQLSocketMessage message) {
You can’t perform that action at this time.
0 commit comments