Skip to content

Fix response of `securityTrainingUpdate` mutation

Mehmet Emin INAC requested to merge 346479_fix_mutation_response into master

What does this MR do and why?

This MR fixes the response of the securityTrainingUpdate mutation while deleting the record if it was marked as primary.

Before the fix;

{
  "data": {
    "securityTrainingUpdate": {
      "errors": [],
      "training": {
        "id": "gid://gitlab/Security::TrainingProvider/3",
        "name": "Acme",
        "description": "Acme trains you all!",
        "isEnabled": false,
        "isPrimary": true
      }
    }
  }
}

After the fix;

{
  "data": {
    "securityTrainingUpdate": {
      "errors": [],
      "training": {
        "id": "gid://gitlab/Security::TrainingProvider/3",
        "name": "Acme",
        "description": "Acme trains you all!",
        "isEnabled": false,
        "isPrimary": false
      }
    }
  }
}

Related to #346479 (closed).

MR acceptance checklist

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

Merge request reports