graphql-flutter icon indicating copy to clipboard operation
graphql-flutter copied to clipboard

Consider moving to dio over http client

Open micimize opened this issue 4 years ago • 3 comments

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

micimize avatar Aug 14 '20 15:08 micimize

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.

jeffscaturro-aka avatar Aug 19 '20 12:08 jeffscaturro-aka

Now that we've migrated to using gql_links in 4.0.0-beta.1 (#648) there is a dio link, which apparently supports http2. I'm not sure how well it works with graphql/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!

micimize avatar Oct 07 '20 14:10 micimize

https://github.com/gql-dart/gql/pull/157 It seems they are trying to simplified it for allowing custom http library too.

iNoles avatar Oct 31 '20 15:10 iNoles