Skip to content

Fix refreshing status and corrupted cached data on the GraphQL newsfeed

Martin Santangelo requested to merge pull-refresh-fix into expo-migration

Ticket(s) / Related Merge Requests

#5262 (closed) #5325 (closed)

Summary of Changes

  • The newsfeed was refreshing correctly but it was removing the loading indicator too fast, even before the API call finishes. I solved this using the isRefetching propery of react-query, since isLoading doesn't seems to work when initialData is set.

  • I found that the cached information was corrupted in some cases, causing emtpy Highlights and other problems on the feed. I reopened #5262 (closed) and solved the issue.

Testing Considerations

Refresh should work as expected. The refreshing indicator now remains until the refresh finishes.

The cached information is shown properly. (After opening the app again)

Regression Scope

Newsfeed refresh and caching

Platform Affected (web, mobile, etc)

both

Developer Testing Completed

ios/android

Screenshots

RPReplay_Final1704320250

Does this impact

  • Localization
  • Dark/light mode
  • Guest mode

Merge request reports