Intended outcome:
To access data.error inside a graphQL HoC wrapped component to do error handling.
Actual outcome:
The data.error prop is never passed to the child as expected. I did a little digging and it appears that the logic to prevent unnecessary re-renders in the graphql HoC doesn't take the error state into consideration and uses stale data props.
How to reproduce the issue:
I've updated your Apollo 2.0 Client example to illustrate the issue: https://codesandbox.io/s/pyp1zw702q
See the use of data.error in list.js. I console log when an error occurs using the apollo-link-error setup in index.js
Version
This is an issue for me as well.
This issue appears to be more critical than I initially thought.
I'm now seeing stale data.props that are out of sync with what is in the InMemoryCache after mutations. See the attached screenshot which demonstrates a customer name being out of sync.

Same problem for me.
Experiencing same issue, the error prop never seems to return anything else than undefined, and when a component that was supposed to have an error gets unmounted, it throws an Unhandled error error right after.
Using apollo-client 2.0.1 and react-apollo 2.0.0
This test should validate that this actually works. Is the {{error}} field only for non-graphql errors (e.g. network failure, 5xx responses, etc.)?
As far as I can tell, the test doesn't cover the optimization logic in render: https://github.com/apollographql/react-apollo/blob/master/src/graphql.tsx#L604-L622
It focuses mainly on componentWillReceiveProps which is no guarantee that the wrapped component will be given the right props during render.
With apollo-client 2.0.2 the error now get's correctly set for me, but I still get the Unhandled error error right after.
This issue has been automatically labled because it has not had recent activity. If you have not received a response from anyone, please mention the repository maintainer (most likely @jbaxleyiii). It will be closed if no further activity occurs. Thank you for your contributions to React Apollo!
This should no longer be an issue with current versions of React Apollo. Thanks!
Most helpful comment
This issue appears to be more critical than I initially thought.
I'm now seeing stale data.props that are out of sync with what is in the InMemoryCache after mutations. See the attached screenshot which demonstrates a customer name being out of sync.