reactive-python/reactpy-django

Add `fetch_policy=...` to `use_query`

Archmonger opened this issue · 1 comments

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

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.