You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Users want useMutation to work just like useQuery, not callback style like useLazyQuery.
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.
For queries and mutations, accessors are deep frozen into the respond data. That is, their ability to trigger fetches is removed after their first fetch.
Caches are only read by accessors before their first fetch happens.
Our current 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.
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: