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

Consider fetch policy link, cache interface link #652

Open
micimize opened this issue May 23, 2020 · 2 comments
Open

Consider fetch policy link, cache interface link #652

micimize opened this issue May 23, 2020 · 2 comments
Labels
link Relates to link functionality

Comments

@micimize
Copy link
Collaborator

The query manager logic could be broken down into a FetchPolicyLink that forks Requests and a CacheLink that handles caching logic.

Though, one major issue with this (aside from refactoring work) is that it might not be possible to achieve adequate decoupling to make the "elegance gain" worth it. Namely, we round-trip to the cache with network responses to merge in optimistic data

Related to #563

@micimize micimize added the link Relates to link functionality label Oct 7, 2020
@micimize
Copy link
Collaborator Author

related to #798.

@micimize
Copy link
Collaborator Author

How much we can break code out into links is still relatively unexplored. The gql_link system is stream-based, and has routing capabilities, meaning one link could handle polling, and another could be a cache reading terminating link, and another could handle optimistic responses in front of the cache link, and one could compose the eager and networked results, etc.

However again, if eager results were part of a stream, then they couldn't be synchronous like they are now, which was done to prevent a null frame of data being seen in graphql_flutter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
link Relates to link functionality
Projects
None yet
Development

No branches or pull requests

1 participant