Build API to move TLGs between Organizations and confirm the organization
## Background
We need an API to move TLGs between Organizations for https://gitlab.com/groups/gitlab-org/-/work_items/21394+
## Requirements
- GraphQL
- Record an Audit event when TLG is moved. Need discussion on if this should be an Admin audit event or a Group audit event?
- The GraphQL query initiates the organization confirmation service https://gitlab.com/gitlab-org/gitlab/-/work_items/598074
### Arguments
- groupIds
- Array of group IDs. Should validate that they are TLGs
### Response
Query is synchronous. After TLGs are transferred, organization is marked confirmed.
## Implementation guide
GraphQL Query:
```graphql
mutation OrganizationConfirm($input: OrganizationConfirmInput!) {
organizationConfirm(input: $input) {
organization {
id
name
path
state
}
errors
}
}
```
Variables:
```json
{
"input": {
"id": "gid://gitlab/Organizations::Organization/123",
"groups": [
"gid://gitlab/Group/456",
"gid://gitlab/Group/789"
]
}
}
```
Response (Success):
```json
{
"data": {
"organizationConfirm": {
"organization": {
"id": "gid://gitlab/Organizations::Organization/123",
"name": "My Organization",
"path": "my-org",
"state": "confirmed"
},
"errors": []
}
}
}
```
Response (Failure - Transfer Failed):
```json
{
"data": {
"organizationConfirm": {
"organization": null,
"errors": [
"Failed to transfer 1 of 2 groups",
"Group 'some-group' must be a root group"
]
}
}
}
```
issue