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
{{ message }}
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
It is currently impossible (to my knowledge) to access the variables used in a mutation in the update function:
<MutateFunctionupdate={(proxy,{ data })=>{doSomething();}>{mutate=>(<><divonClick={()=>{mutate({variables: id: 1}});}}/><divonClick={()=>{mutate({variables: id: 2}});}}/></>)}</MutateFunction>
Actual outcome:
Sometimes to properly update the cache we need to access the variables (e.g. we delete something on the server and it returns a 204 / Boolean, so we can't access the payload to guess the variables).
How to reproduce the issue:
I think the code above is pretty self-explanatory. Let me know if you need more context though!
Version
apollo-client@2.5.1
react-apollo@2.5.2
Thanks in advance!
The text was updated successfully, but these errors were encountered:
To help provide a more clear separation between feature requests and bugs, and to help clean up the feature request backlog, React Apollo feature requests are now being managed under the https://github.com/apollographql/apollo-feature-requests repository.
Intended outcome:
It is currently impossible (to my knowledge) to access the variables used in a mutation in the update function:
Actual outcome:
Sometimes to properly update the cache we need to access the variables (e.g. we delete something on the server and it returns a 204 / Boolean, so we can't access the payload to guess the variables).
How to reproduce the issue:
I think the code above is pretty self-explanatory. Let me know if you need more context though!
Version
Thanks in advance!
The text was updated successfully, but these errors were encountered: