You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
In the Query component, the render prop function returns an object with a
data
field. I believe the intention is for this to always default to an empty object, rather than be undefined:https://www.apollographql.com/docs/react/essentials/queries.html#render-prop
This allows checks like
if (data.user)
instead ofif (data && data.user)
.However, in case of an Error, this object can be undefined:
react-apollo/src/Query.tsx
Line 378 in e95ba7b
Would it be better to return an empty data object in this case?
data: (this.queryObservable!.getLastResult() || {}).data || {},
The text was updated successfully, but these errors were encountered: