alkem-io / client-web

Default web frontend, enabling browsing the Alkemio platform - so the hosted Challenges and communities collaborating around those Challenges.
https://alkem.io
European Union Public License 1.2
15 stars 6 forks source link

BUG: hubCommunity, challengeCommunity and opportunityCommunity requests are executed twice #2136

Open Comoque1 opened 2 years ago

Comoque1 commented 2 years ago

Describe the bug When user navigates to Hub, Challenge or Opportunity page, hubCommunity, communityChallenge and communityOpportunity requests are executed twice

To Reproduce Steps to reproduce the behavior:

  1. Go to https://dev.alkem.io/
  2. Authenticate with GA
  3. Open browser network tool
  4. Click on hub "UN Sustainable Development Goals" - hubCommunity request is executed twice image.png
  5. Open challenge "02 Zero Hunger" - challengeCommunity request is executed twice image.png
  6. Open opportunity "Rural Development" - opportunityCommunity request is executed twice image.png

Expected behavior The requests are executed only ones

alstojanovic commented 2 years ago

Closing the bug as this is expected behaviour when combining Apollo query and React context. The query that is doubled is not heavy on data and doesn't exhausting our resources.

This will be fixed by removing the community context which requires more time than estimated.

techsmyth commented 2 years ago

@alstojanovic this should not be closed but rather blocked as it cannot be fixed until we remove the community context. Also I would challenge that the community query is "light" - certainly not on some of the bigger hubs such as hub.alkem.io/digicampus.

alstojanovic commented 2 years ago

@techsmyth this issue will be solved only by removing community context which is already deprecated. That constitutes as a technical depth and is a bit more work and can potentially break other things. I closed the bug but I was going to open a separate card for tackling this. I'm ok with having this in blocked state, as a reminder for the issue, but the tech debt card would also serve as a reminder so then there is no point having the bug card anymore.

I'm ok either way. We can both open a tech debt card and have the bug in blocked state or whatever is best process wise.