Better target the player information query used for non-profile pages #738
Labels
frontend
Front end related issues / features
good 1ˢᵗ issue
Easier tasks for new contributors
Hasura
GraphQL / Hasura related tasks
Currently, the
LoginButton
is using theuseUser
hook which pulls in all the information in thePlayerFragment
which is ~40 variables so that it can display the username and profile image.Most importantly, it is retrieving the DAO memberships which causes three network requests (to check three different chains) via a Hasura remote schema.
Arguably, caching DAO memberships should be on the agenda since that would also allow us to more reliably pull DAO titles which aren't stored on chain (or in The Graph) after v2.1. Until they are, using a more targeted query for the logged in display would likely cause a noticeable performance change. The existing
PlayerFragment
could be used with@skip
directives added if a booleanfor-login-display
is set to true.The text was updated successfully, but these errors were encountered: