Add external control fields to Control GraphQL API
What does this MR do and why?
Add external control fields to GraphQL API
- control_type
- external_url
- secret_token (update only)
We want to be able to provide an interface that updates the external control fields.
References
- Add external control to control graphql API
- Update GraphQL API to allow creating external compliance requirements
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
** No UI changes
How to set up and validate locally
Run these GraphQL queries
mutation {
createComplianceRequirementsControl(input: {
complianceRequirementId: "gid://gitlab/ComplianceManagement::ComplianceFramework::ComplianceRequirement/24",
params: {
name: "external_control",
controlType: "external",
externalUrl: "https://www.google.com/123",
secretToken: "DASDAS"
}
}) {
errors
clientMutationId,
requirementsControl{
name,
expression,
id,
controlType
}
}
}
mutation {
updateComplianceRequirementsControl(input: {
id: "gid://gitlab/ComplianceManagement::ComplianceFramework::ComplianceRequirementsControl/10"
params: {
name: "minimum_approvals_required_2",
controlType: "internal",
expression: "{\"field\":\"minimum_approvals_required\",\"operator\":\"=\",\"value\":2}"
}
}) {
errors
clientMutationId,
requirementsControl{
name,
expression,
id,
controlType,
externalUrl
}
}
}
Edited by Huzaifa Iftikhar