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

Add autoRefetch Option to useQuery for automatic stale entry refetching #49

Open
quiteeasy opened this issue May 27, 2024 · 5 comments
Open
Labels
✨ feature request a new feature request

Comments

@quiteeasy
Copy link
Contributor

Add a boolean option, autoRefetch, to automatically refetch an entry when it becomes stale.

@posva
Copy link
Owner

posva commented May 27, 2024

Interesting. This could be useful as a plugin once more stuff is exposed. I see it as a dangerous default as it would spam the server very often

@quiteeasy
Copy link
Contributor Author

Adding this as an option would be useful, but I would not set it to true by default

Copy link
Owner

posva commented May 27, 2024

If it's added, it should be fully tree shakable too

@quiteeasy
Copy link
Contributor Author

Should we add an option to QueryPlugin or possibly another plugin (perhaps as a separate package) to enable autoRefetch across the app, while still allowing control through each individual useQuery options? This approach would ensure it is tree-shakable and maintains flexibility

@posva
Copy link
Owner

posva commented May 27, 2024

We will see later on but probably a different kind of plugin. I think a lot of other more critical features are still missing before this 😄

@posva posva added the ✨ feature request a new feature request label May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feature request a new feature request
Projects
Status: Todo
Development

No branches or pull requests

2 participants