Error on renderToStringWithData error data can't reach to components on SSR. Even If i apply errorPolicy: "all".
Intended outcome: this.props.data.error=error_data
Actual outcome:this.props.data.error= undefined
How to reproduce the issue: Try server rendering with a query(component) return any error on graphql resolver.
Version
Dup of #1781
@adamesque Its also not working with default errorPolicy.
@adamesque, these are separate problems.
This one is about the fact that getDataFromTree and renderToStringWithData throw an error when any error occurs, even when errorPolicy is set to all.
I've opened a PR to fix the inaccurate documentation around error cacheing in Apollo. https://github.com/apollographql/apollo-client/pull/4237
Most helpful comment
@adamesque, these are separate problems.
1781, is about errors not being cached and thus losing the ability to handle them when mounting and remounting components.
This one is about the fact that
getDataFromTreeandrenderToStringWithDatathrow an error when any error occurs, even whenerrorPolicyis set toall.615 has more detail.