Skip to content

refactor (graphql-server): Optimize Hasura Queries with Session Variables - #19347

Merged
TiagoJacobs merged 3 commits into
bigbluebutton:v3.0.x-releasefrom
gustavotrott:graphql-general-improvements
Jan 9, 2024
Merged

TiagoJacobs merged 3 commits into
bigbluebutton:v3.0.x-releasefrom
gustavotrott:graphql-general-improvements

Conversation

@gustavotrott

@gustavotrott gustavotrott commented Dec 15, 2023 •

Copy link
Copy Markdown
Contributor

Optimize Hasura Queries with Session Variables

This update introduces Hasura session variables to enhance query performance, particularly for validations involving lockSettings. Previously, queries frequently checked lockSettings and userId to determine user access to specific data, such as cursor visibility. This approach hindered query multiplexing efficiency. Now, lockSettings are fetched only once when the Graphql connection is established, using session variables. This reduces reliance on repetitive, resource-intensive checks. Key areas benefiting from this include:

  • Userlist visibility (lockSettings.hideUserList)
  • Cursor visibility for other viewers (lockSettings.hideViewersCursor)
  • Annotation visibility (lockSettings.hideViewersAnnotation)
  • Webcam access control (webcamsOnlyForModerator)

Other than that

  • Add meeting.createdAt (the idea is to standardize dates using timestamp type and ending name with At)
  • BBB-WEB will update lockSettings and webcamsOnlyForModerator in real-time (to make the new Hasura session variables possible)

Tests

Screencast.from.2023-12-15.18-50-36.webm

@gustavotrott gustavotrott added this to the Release 3.0 milestone Dec 15, 2023
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions

1 Security Hotspot

See analysis details on SonarCloud

@github-actions

Copy link
Copy Markdown

Automated tests Summary

✅ All the CI tests have passed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants