Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better target the player information query used for non-profile pages #738

Closed
dysbulic opened this issue Aug 4, 2021 · 0 comments
Closed
Labels
frontend Front end related issues / features good 1ˢᵗ issue Easier tasks for new contributors Hasura GraphQL / Hasura related tasks

Comments

@dysbulic
Copy link
Member

dysbulic commented Aug 4, 2021

Currently, the LoginButton is using the useUser hook which pulls in all the information in the PlayerFragment 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 boolean for-login-display is set to true.

@dysbulic dysbulic added good 1ˢᵗ issue Easier tasks for new contributors frontend Front end related issues / features Hasura GraphQL / Hasura related tasks labels Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Front end related issues / features good 1ˢᵗ issue Easier tasks for new contributors Hasura GraphQL / Hasura related tasks
Projects
None yet
Development

No branches or pull requests

1 participant