Skip to content

CV2-6732: fix N+1 query - #2446

Merged
melsawy merged 1 commit into
developfrom
CV2-6732-n-1-query-team
Jul 26, 2026
Merged

CV2-6732: fix N+1 query#2446
melsawy merged 1 commit into
developfrom
CV2-6732-n-1-query-team

Conversation

@melsawy

@melsawy melsawy commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Description

N+1 query triggered by executing the following query

query PublishedReports($query: String!) {
search(query: $query) {
number_of_results
medias {
edges {
node {
full_url
}
}
}
}

so I added TeamLoader to load associated team

References: CV2-6732

How to test?

Re-run unit tests

Checklist

  • I have performed a self-review of my code and ensured that it is safe and runnable, that code coverage has not decreased, and that there are no new Code Climate issues. I have also followed Meedan's internal coding guidelines.

@melsawy
melsawy marked this pull request as ready for review July 25, 2026 21:13
@melsawy
melsawy requested a review from caiosba July 25, 2026 21:13

@caiosba caiosba left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice approach with loaders as well 👍

@melsawy
melsawy merged commit 11231d1 into develop Jul 26, 2026
12 of 13 checks passed
@melsawy
melsawy deleted the CV2-6732-n-1-query-team branch July 26, 2026 16:43
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