Skip to content

Add fetch_policy=... to use_query #103

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

Closed
Archmonger opened this issue Oct 14, 2022 · 1 comment
Closed

Add fetch_policy=... to use_query #103

Archmonger opened this issue Oct 14, 2022 · 1 comment

Comments

@Archmonger
Copy link
Contributor

Archmonger commented Oct 14, 2022

Current Situation

There currently isn't a native way to cache or defer execution of a use_query call.

Proposed Actions

Mimic behavior of apollo's useQuery fetch policies within our use_query hook.

The only parameters that make sense to carry over are:

  • cache-first
  • cache-only
  • no-cache
@Archmonger
Copy link
Contributor Author

Archmonger commented Sep 16, 2023

If I developed these caching features as generics that could be ported to ReactPy core later, then we don't really have a good method of developing this in a multiprocessing compatible way.

And then if I think about this as a Django-specific feature, then it doesn't make much sense. Package already exist for caching ORM queries in a far more robust manner.

Closing this issue. If our situation changes in the future we can re-open this issue.

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

No branches or pull requests

1 participant