Add sorting to compliance_frameworks GraphQL field

What does this MR do and why?

Add sorting to compliance_frameworks GraphQL field

Users can sort compliance frameworks by name and last updated time in the group and project queries

EE: true Changelog: added

References

In order to implement the second solution suggestion in #535118 (closed) we need to add sorting to the Last updated column and fix the sorting in Name column, on the compliance framework table. To see this MR's change reflect in the UI take a look at the screen recordings of !192560 (merged)

MR Description
!190655 (merged) Add updated_at field to ComplianceFrameworkType
!190668 (merged) Add last updated information to Compliance Frameworks table
!192475 (merged) 👈 you're here
!192560 (merged) Add ability to sort compliance frameworks on frontend

Screenshots or screen recordings

N/A

How to set up and validate locally

  1. Have a group with Ultimate subscription
  2. Navigate to Secure > Compliance Frameworks
  3. Create some frameworks; assign them to a project
  4. Use one of the below queries on https://gdk.test:3443/-/graphql-explorer
Group Compliance Frameworks
query complianceFrameworksGroupList {
  namespace: group(fullPath: "ultimate-group1") {
    id
    name
    complianceFrameworks(sort: NAME_DESC) {
      nodes {
        id
        name
        updatedAt
      }
    }
  }
}
Project Compliance Frameworks
query complianceFrameworksProjectList {
  namespace: project(fullPath: "ultimate-group1/95-project1") {
    id
    name
    complianceFrameworks(sort: NAME_DESC) {
      nodes {
        id
        name
        updatedAt
      }
    }
  }
}

Query Explain

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Sheldon Led

Merge request reports

Loading