react-apollo icon indicating copy to clipboard operation
react-apollo copied to clipboard

onCompleted not called if cache updater function invoked

Open leanne2 opened this issue 8 years ago • 2 comments

Intended outcome: onCompleted callback called

Actual outcome: onCompleted callback not called until i commented out the mutation update function contents e.g when i stopped updating the cache. My guess is its related to this issue: https://github.com/apollographql/react-apollo/issues/2531 because the component making the mutation is nested in another container whose values are updated by the updater function (and therefore causing a re-render of the component with the onCompleted callback)

Version

leanne2 avatar Nov 22 '18 20:11 leanne2

I commented on issue #2531 here Hope it helps.

Rkuro avatar Dec 15 '18 19:12 Rkuro

React Apollo has been refactored to use React Hooks behind the scenes for everything, which means a lot has changed since this issue was opened (and a lot of outstanding issues have been resolved). We'll close this issue off, but please let us know if you're still encountering this problem using React Apollo >= 3.1.0. Thanks!

hwillson avatar Sep 06 '19 11:09 hwillson