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

maybeRebroadcastQueries on queries and direct cache writes #728

Closed
micimize opened this issue Sep 14, 2020 · 2 comments
Closed

maybeRebroadcastQueries on queries and direct cache writes #728

micimize opened this issue Sep 14, 2020 · 2 comments
Assignees
Labels
v4 Issue with a v4 library

Comments

@micimize
Copy link
Collaborator

Right now cache.writeQuery flags the cache for rebroadcast, but the only time maybeRebroadcastQueries is in mutate

Also, this docstring is wrong, I believe because I didn't want to needlessly rebroadcast. Need to re-investigate:
https://github.com/zino-app/graphql-flutter/blob/7192c1669c7dbecff0bbcd0665522c5b41207ab2/packages/graphql/lib/src/core/query_manager.dart#L282

We should either maybeRebroadcastQueries at the end of every query and cache write, or it should be somehow configurable via a rebroadcastPolicy

Consolidating #647 and #587 here

@micimize micimize added the v4 Issue with a v4 library label Sep 14, 2020
@micimize micimize self-assigned this Sep 14, 2020
@micimize
Copy link
Collaborator Author

As part of this, we should have the direct cache access methods accessible on the client with rebroadcasting capacity. Thus consolidating that part of #176 here as well

@micimize
Copy link
Collaborator Author

I was pretty wrong here – maybeRebroadcastQueries was already called every time a result was added. Added clearer docstrings to avoid making this mistake again

4.0.0-alpha.7 adds cache access methods to the client that handle rebroadcasting, closing this entirely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v4 Issue with a v4 library
Projects
None yet
Development

No branches or pull requests

1 participant