Skip to content

Support multiple ids when querying compliance frameworks

What does this MR do and why?

This MR adds support to query multiple compliance frameworks by ids.

Additional context why this is needed can be found here: #432320 (comment 1658138439).

Screenshots or screen recordings

All Filtered
CleanShot_2023-12-01_at_15.01.12_2x CleanShot_2023-12-01_at_15.01.46_2x

How to set up and validate locally

  1. Create a new group
  2. For that group create multiple Compliance Frameworks (Settings -> General -> Compliance Frameworks)
  3. Go to GraphQL Explorer (/-/graphql-explorer)
  4. Try to fetch frameworks with provided IDs. Example query:
    query getComplianceFramework(
      $fullPath: ID!
      $complianceFrameworks: [ComplianceManagementFrameworkID!]
    ) {
      namespace(fullPath: $fullPath) {
        id
        name
        complianceFrameworks(ids: $complianceFrameworks) {
          nodes {
            id
            name
            default
            description
            color
            pipelineConfigurationFullPath
            projects {
              nodes {
                id
                name
              }
            }
          }
        }
      }
    }
    Query variables:
    {
      "fullPath": "compliance-frameworks",
      "complianceFrameworks": ["gid://gitlab/ComplianceManagement::Framework/4", "gid://gitlab/ComplianceManagement::Framework/3"]
    }

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #432507 (closed)

Edited by Martin Čavoj

Merge request reports