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.23k stars 608 forks source link

Resolve error is throwed from graphql package when toggleConnection != null & Upgrate connectivity_plus #1434

Closed hantrungkien closed 1 month ago

hantrungkien commented 1 month ago
  1. Resolve: error is throwed from graphql package (althought it doesn't make any crash) when toggleConnection != null.
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: ValueStream has no value. You should check ValueStream.hasValue before accessing ValueStream.value, or use ValueStream.valueOrNull instead.
      BehaviorSubject.value (package:rxdart/src/subjects/behavior_subject.dart:146:5)
      SocketClient._listenToToggleConnection.<anonymous closure> (package:graphql/src/links/websocket_link/websocket_client.dart:264:40)
      _RootZone.runUnaryGuarded (dart:async/zone.dart:1594:10)
      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
      _MultiStreamController.addSync (dart:async/stream_impl.dart:1101:36)
      _MultiControllerSink.add (package:rxdart/src/utils/forwarding_stream.dart:130:35)
      _TakeUntilStreamSink.onData (package:rxdart/src/transformers/take_until.dart:13:31)
  1. Upgrate: connectivity_plus: ^6.0.3 for graphql_flutter package.

2 important commits:

hantrungkien commented 1 month ago

@vincenzopalazzo please review help me. Thanks a lot!

vincenzopalazzo commented 1 month ago

Thanks, I just realized that the commit are not following our hacking guide, and this mean that the changelog will generate in the wrong way.

Please read it https://zino-hofmann.github.io/graphql-flutter/docs/dev/MAINTAINERS.html and push the changes when the PR is final and compliant with the document in this way I can merge and release the package