graphql-flutter
graphql-flutter copied to clipboard
Consider moving to dio over http client
dio
has more features and seems better maintained than http
, and has come up when discussing multiple issues: #708 and #592
there is already a gql_dio_link
to work off of / contribute to, but might be easier to copy gql_http_link
, replace the client, then make tests pass
Another point of thought on this topic, in favor of supporting dio
, is that we could utilize dio interceptors. While we could write custom links, interceptors still feel more natural and the level of entry for many seems lower. In addition, many clients already have dio interceptors set up for their Rest API if they're already using dio, which there is a good chance they are.
This would help out with issues like #704.
Now that we've migrated to using
gql_links
in4.0.0-beta.1
(#648) there is adio
link, which apparently supportshttp2
. I'm not sure how well it works withgraphql/client.dart
yet, but this is maybe another reason to consider dio (#712) (merging into that issue)
You thought what you needed what http2 support, but it was me, Dio!
https://github.com/gql-dart/gql/pull/157 It seems they are trying to simplified it for allowing custom http library too.