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
Fix nullable refetchedFragmentRef in checkSameIDAfterRefetch (#4945)
Summary:
I call useRefetchableFragment(), e.g. getSomethingById.
The backend may return null ("Something" no longer exists).
Then the queryData is `{node: null}`
fragmentRefPathInResponse is `['node']`
so fragmentRef (refetchedFragementRef) is `null`
and the
`var resultID = refetchedFragmentRef[ID_KEY]` throws `cannot read properties of null`.
Pull Request resolved: #4945
Test Plan: Updated to add unit tests
Reviewed By: lynnshaoyu
Differential Revision: D73461930
Pulled By: captbaritone
fbshipit-source-id: a98089cdcad8c29e13106fbf4e4aba2e8dc8fafd
0 commit comments