client-web icon indicating copy to clipboard operation
client-web copied to clipboard

BUG: hubCommunity, challengeCommunity and opportunityCommunity requests are executed twice

Open Comoque1 opened this issue 2 years ago • 3 comments

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

Comoque1 avatar Jun 03 '22 15:06 Comoque1

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.

alstojanovic avatar Jun 13 '22 14:06 alstojanovic

@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.

techsmyth avatar Jun 13 '22 18:06 techsmyth

@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.

alstojanovic avatar Jun 14 '22 07:06 alstojanovic