Mutation for adding requirements to a compliance framework
What does this MR do and why?
This MR adds a GraphQL mutation for adding requirements to a compliance framework.
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.
How to set up and validate locally
- You must have a group with GitLab Ultimate license for testing this.
- Make sure the group has at least one compliance framework associated with it. If not then you can follow steps mentioned here for creating one.
- Now open the graphql explorer, for example http://gdk.test:3000/-/graphql-explorer, and run the following mutation
mutation createComplianceRequirement {
createComplianceRequirement(
input: {
complianceFrameworkId: "gid://gitlab/ComplianceManagement::Framework/<framework_id>",
params: {
name: "Custom req 1",
description: "some description"
}
}) {
errors
requirement {
id
name
description
}
}
}
- You should not get any error while running this and response would be something like:
{
"data": {
"createComplianceRequirement": {
"errors": [],
"requirement": {
"id": "gid://gitlab/ComplianceManagement::ComplianceFramework::ComplianceRequirement/3",
"name": "Custom req 1",
"description": "some description"
}
}
}
}
Related to #470695
Edited by Hitesh Raghuvanshi