Skip to content

Draft: Adding assign and unassign mutations for frameworks

Hitesh Raghuvanshi requested to merge 464160-assign-unassign-mutations into master

What does this MR do and why?

Changed association of frameworks with projects

Changed association between projects and frameworks from has_one to has_many for supporting multiple frameworks for a project

Changelog: added EE: true

Mutations

For assigning framework(s)

mutation projectAssignComplianceFrameworks {
  projectAssignComplianceFrameworks(input: {projectId: "gid://gitlab/Project/24", 
    complianceFrameworkIds: ["gid://gitlab/ComplianceManagement::Framework/2"]}) {
    errors
    project {
     id
     name
    }
  }
}

For unassigning framework(s)

mutation projectUnassignComplianceFrameworks {
  projectUnassignComplianceFrameworks(input: {projectId: "gid://gitlab/Project/24", 
    complianceFrameworkIds: ["gid://gitlab/ComplianceManagement::Framework/2"]}) {
    errors
    project {
     id
     name
    }
  }
}

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

Numbered steps to set up and validate the change are strongly suggested.

Related to #464160 (closed)

Edited by Hitesh Raghuvanshi

Merge request reports