Loading
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. Returnsasync: true. - Sync path (flag disabled): delegates to
Groups::TransferService#execute/Projects::TransferService#execute. Returnsasync: 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
- Enable the feature flag:
Feature.enable(:groups_and_projects_async_transfer) - Run a
groupTransfermutation in the GraphQL explorer:mutation { groupTransfer(input: { id: "gid://gitlab/Group/123", targetId: "gid://gitlab/Group/456" }) { group { id name } async errors } } - 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.