react-apollo
react-apollo copied to clipboard
onCompleted doesn't run when re-rendered component
Here is my code:
https://gist.github.com/dafapramudya/98684603c3c465713f9c26858655ab62
Intended outcome:
Run onCompleted after mutation complete
Actual outcome:
It's because i put mutation in ternary condition, so if mutation is success, data.topup.Status will be changed. and if i remove that ternary condition, onCompleted method will run perfectly.
Any solution? Thank you.
How to reproduce the issue:
Version
- apollo-client@<^2.4.2>
- react-apollo@<^2.2.4>
@dafapramudya Can you try using react-apollo 2.5.3 and post back if this is still an issue?
@hwillson Wow thank you, now it's work perfectly.