Related Issues:
- apollographql/apollo-client#2258
- apollographql/apollo-client#2513
- apollographql/react-apollo#1229
- apollographql/apollo-client#2533
- An unhandled network error when unmounting a component that failed to fetch
- Undefined response in afterware for a network error (e.g. client offline or server crashed)
- Component can't render data after an error (stuck on error)
This template is using the Fake graphql server from : http://fake.graphql.guru/
You'll have to simulate an offline state (e.g with chrome developer tools -> Network), this is the same behavior as server offline or crashed.
The "New component with apollo" button calls a component with apolloClient HOC querying a random firstname
- run
yarn
thenyarn start
(ornpm install
thennpm run start
) - Go offline, click button to fetch then unmount the component to throw the error in console
- Go online then try to fetch/refetch, the component still displays error (but queries are sent and return data)