codepod
codepod copied to clipboard
dashboard not automatically refreshed
If I create a new repo, and click "Codepod" in the breadcrumbs to navigate back to the dashboard, the new repo will not appear on my dashboard until I manually fresh (via the browser) the dashboard page. I am not sure whether we do not have autorefresh or the auto-refresh frequency is too low. But at least every time I access it.
Yes, I'm aware of this. This is a bug somewhere in React re-rendering logic. It should be instantly refreshed.
i can take a look
PR #422 should fix the issue
#422 doesn't fix this issue. (And #422 introduced a regression, fixed in #425).
This issue is weird, it works well (to refresh the dashboard) in the local development env, but doesn't work on the production server.
Possible solutions:
- use the full query
{query: ..., variables: ...}
instead of the string"GetDashboardRepos"
in therefetchQueries
option. Ref: https://github.com/apollographql/apollo-client/issues/5419#issuecomment-598065442 - update GraphQL cache manually instead of relying on
refetchQueries
, similar to what Haochen did in https://github.com/codepod-io/codepod/pull/364#discussion_r1257722308