houdini
houdini copied to clipboard
Add ability to refresh a record
Describe the feature
Right now the only way to manage invalid data is to mark it as stale. We should add a way to tell the cache to reload a particular record by notifying every current subscriber of that record to refetch.
Not sure on the exact name of the method yet but it could look something like
function applyMutation() {
const { data } = await MyMutation.mutate()
const user = cache.get("User", { id: data.updateUser.user.id })
// options are things like "invalidate", "refresh", etc
user.refetch()
}
Criticality
cool improvement, my projects will benefit from it
For us, this would be the single largest improvement that could be made. We have so much weird code to work around this right now.