-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
updateQueries by id (dataIdFromObject) #565
Comments
@deoqc I think this could be quite useful in some edge cases. Would you be willing to make a PR for this and get it implemented? |
We've decided to implement this kind of imperative API for dealing with store updates right after we implement some logic for refetching, and before we implement any declarative API. Closing this issue for lack of activity. |
@deoqc Did you solve your issue? |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Related to this, but instead of reading from cache, writing to cache.
Is it possible to update a mutation by some
id
(when usingdataIdFromObject
), instead of by query name (as is done now)?Let me be more clear:
I know the user id (say
id='123'
), then I want to:When using
dataIdFromObject
we prefer to reason in a object by id sense instead of query / paths. For more complicated and nested situations (more common than this example above) is much better to reason and much less error prone.Let's compare these 2:
update by query name / path
update by id
Edit: most of the cases I will just return the parent object and refetch the entire updated child (and let the automatic update by id kick in). But on few important cases, the updated child is huge and I want to return only the relevant data.
The text was updated successfully, but these errors were encountered: