react-apollo v2.2.2 Release Notes
Release Date: 2018-09-28 // over 5 years ago-
- When using
React.createContext
and SSR, we now make sure the context provider value is reset to the previous value it had after its children are walked. @mitchellhamilton in #2304 - ⏪ Revert:
When a query failed on the first result, the query result
data
was being returned asundefined
. This behavior has been changed so thatdata
is returned as an empty object. This makes checking for data (e.g. instead ofdata && data.user
you can just checkdata.user
) and destructring (e.g.{ data: { user } }
) easier. Note: this could potentially hurt applications that are relying on a falsey check ofdata
to see if any query errors have occurred. A better (and supported) way to check for errors is to use the resulterrors
property. #1983
- When using