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.25k stars 620 forks source link

Add interceptors in flutter_graphql to use refresh token to get new access token. #1083

Closed ShourovRoy closed 2 years ago

ShourovRoy commented 2 years ago

Add interceptors in flutter_graphql to use refresh token to get new access token. There is no official solution for using a refresh token in flutter with graphql. Please add this feature in the next version.

budde377 commented 2 years ago

I don't think this is a good idea to implement this as part of the client. You can implement this as a separate link. Furthermore, I'm not totally convinced such a link should be part of this package. It'll increase the amount of code we'll have to maintain and the general usability is questionable.

vincenzopalazzo commented 2 years ago

I'm not totally convinced such a link should be part of this package. It'll increase the amount of code we'll have to maintain and the general usability is questionable.

I agree with this idea! We use an external package to manage the link! However, a new package like graphql_links can be welcome to see around