graphql-flutter
graphql-flutter copied to clipboard
Make `connectivity_plus` optional.
Is your feature request related to a problem? Please describe.
connectivity_plus
should be an optional dependency -- We're currently using Flutter in a very slimmed down embedded Linux environment that does not have dbus, or NetworkManager. The issue is, this package uses connectivity_plus
to check if the client is "online" in generated Flutter Hooks with subscriptions. We're connecting to a local GQL server, on the same device, so this check isn't useful, and is instead creating very noisy stack traces as the plugin tries to connect to NetworkManager's dbus. (Which obviously does not exist.)
Describe the solution you'd like
I think a good solution would be to allow either a flag to disable this connectivity check in the useSubscription
hook, or allow us to override that connectivity check function with a custom one.
Describe alternatives you've considered Installing dbus, and NetworkManager is obviously a solution, but that bloats our Firmware up by a huge amount, and adds even more dependancies we need to maintain in our Linux distribution.
Additional context Using:
- flutter_hooks
- codegen to generate hooks based on
.graphql
files.