alkem-io / server

Core server in the Alkemio platform, offering a GraphQL api for interacting with the logical domain model.
http://alkem.io
European Union Public License 1.2
24 stars 4 forks source link

BUG: Updating hub preference takes around 6 seconds #1983

Open Comoque1 opened 2 years ago

Comoque1 commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://dev.alkem.io/admin/hubs/un-sdgs/community
  2. Authenticate with GA
  3. Open browser network tool
  4. Change a preference - it take ~6 seconds image.png

Expected behavior TBD

Additional context The Hub statistics are as follows:

{
  "data": {
    "hub": {
      "activity": [
        {
          "name": "challenges",
          "value": "17"
        },
        {
          "name": "opportunities",
          "value": "5"
        },
        {
          "name": "projects",
          "value": "2"
        },
        {
          "name": "members",
          "value": "25"
        },
        {
          "name": "aspects",
          "value": "0"
        }
      ]
    }
  }
}
techsmyth commented 2 years ago

@Comoque1 the issue is that the authorization policy is reset after updating a hub preference. And this cascades through all the contents of the Hub. To address requires a much deeper analysis / discussion for how we deal with authorization policy updates.