-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Proxy style mutation hook #1602
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Users want
useMutation
to work just likeuseQuery
, not callback style likeuseLazyQuery
.We have been experimenting with proxy-style mutations in the past, during the early days of core v3 refactoring. Users tend to store proxy objects in states, when properties are being accessed in future renders, unexpected mutation fetches will happen, frequently so in some cases.
It is possible to allow the storage of stale accessors in states, by stripping their ability of triggering further fetches after the first fetch is happened.
memo
of context should be scrapped, do benchmarks if we actually re-create resolver contexts every single render.Subscriptions should not be affected, since reconnection is always allowed and should not have side effects.
Originally posted by @hyusetiawan in #1601 (reply in thread)
The text was updated successfully, but these errors were encountered: