Add GraphQL mutations for async group and project transfers

What does this MR do and why?

Implements GroupTransfer and ProjectTransfer GraphQL mutations as part of the async group/project transfer epic (Part 12).

Both mutations support two execution paths controlled by the groups_and_projects_async_transfer feature flag:

  • Async path (flag enabled): delegates to Groups::TransferService#schedule_async_transfer / Projects::TransferService#schedule_async_transfer, which handle state machine transitions and worker enqueueing. Returns async: true.
  • Sync path (flag disabled): delegates to Groups::TransferService#execute / Projects::TransferService#execute. Returns async: false.

Also adds transfer_in_progress boolean fields to GroupType and ProjectType to expose the current transfer state from the Namespaces::Stateful state machine.

References

Closes #586610 (closed)

Screenshots or screen recordings

N/A — backend-only change.

How to set up and validate locally

  1. Enable the feature flag:
    Feature.enable(:groups_and_projects_async_transfer)
  2. Run a groupTransfer mutation in the GraphQL explorer:
    mutation {
      groupTransfer(input: { id: "gid://gitlab/Group/123", targetId: "gid://gitlab/Group/456" }) {
        group { id name }
        async
        errors
      }
    }
  3. Verify the group state transitions to transfer_scheduled.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading
Loading