Fix complianceFrameworkPolicies query complexity
What does this MR do and why?
In Edit policies section (!166636 - merged) we have edited policy section to show only policies assigned to framework. Some changes made to the query resulted in "Query has the complexity of 259, which exceeds max complexity of 250" error for non-admin users. This MR aims to fix the problem. It reverts some changes done to query and logic while keeping the styles and still showing only assigned policies.
Fix query complexity
Make sure complianceFrameworkPolicies query complexity is less 250
Changelog: fixed
EE:true
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
- Make sure you have Ultimate or Premium subscription
- Go to the compliance center of the top level group (Secure > Compliance center in the right menu)
- Go to edit framework which has policies attached
- Or create a framework and scope policy to it
- Observe policies section
- You can try to change query complexity for admin to 250 in this file
app/graphql/gitlab_schema.rb
to make sure the data is still loaded
Related to #478190 (closed)