Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support FetchPolicy.cacheFirst on Query widget #366

Closed
lucasavila00 opened this issue Jul 28, 2019 · 8 comments
Closed

Support FetchPolicy.cacheFirst on Query widget #366

lucasavila00 opened this issue Jul 28, 2019 · 8 comments
Labels
🐛 bug Something isn't working flutter Issue relates mainly to graphql_flutter investigate We are looking into the issue released on @beta released
Projects

Comments

@lucasavila00
Copy link
Contributor

I'm trying to use the Query widget to query something only if it is not cached but I can't.

If I set the Fetch Policy to cacheFirst I'd like it to be the fetch policy, but since the Query widget replaces the fetch policy to cacheAndNetwork I can't do this.

I don't know why the widget does this but a fix would be to simply remove the code that replaces the fetchPolicy.

@mainawycliffe
Copy link
Collaborator

mainawycliffe commented Jul 28, 2019

Yea, that line does look unnecessary, not sure why it is there. When the policy is cacheFirst, it should not update stale data, but rather should stop at cache.

@mainawycliffe mainawycliffe added 🐛 bug Something isn't working flutter Issue relates mainly to graphql_flutter investigate We are looking into the issue labels Jul 28, 2019
@mainawycliffe mainawycliffe added this to To do in Open Scrum via automation Jul 28, 2019
@lucasavila00
Copy link
Contributor Author

Yes, that's the same as I thought.
I was looking at git blame and the commit that introduced it has no fixed issue.
I have been using a forked version without this overriding and I haven't found any issues yet.

Maybe @HofmannZ could shed some light on the problem as this commit was his :)

@mainawycliffe
Copy link
Collaborator

@lucasavila00 can you PR this?

@prajwalmr62
Copy link

prajwalmr62 commented Aug 29, 2019

@mainawycliffe I've raised a PR with the changes.

PR 396

@mainawycliffe
Copy link
Collaborator

This should be closed by this PR from @micimize

Open Scrum automation moved this from To do to Done Aug 30, 2019
@HofmannZ
Copy link
Member

🎉 This issue has been resolved in version 2.1.1-beta.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@HofmannZ
Copy link
Member

🎉 This issue has been resolved in version 3.0.0-beta.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@HofmannZ
Copy link
Member

🎉 This issue has been resolved in version 3.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working flutter Issue relates mainly to graphql_flutter investigate We are looking into the issue released on @beta released
Projects
No open projects
Open Scrum
  
Done
Development

No branches or pull requests

4 participants