GraphQL mutation for bulk deletion of packages

Context

When a package is uploaded to the GitLab Package Registry it can contain one or many files. For package manager formats that allow duplicate uploads, a single package name/version can contain hundreds of files.

Problem to solve

The problem is that these files can be quite large and your cost of storage can quickly add up. Right now, your only option is to use the user interface or the API to delete one file at a time. This is inefficient for heavy users of the package registry who likely have dozens of projects and thousands of files that need to be deleted.

As a result, you likely have just been paying more for additional storage.

Proposal

Expand on the existing GraphQL API to add a mutation that allows users to bulk delete packages.

Further details

This new mutation will be used to power the user interface and allow users to bulk delete packages from the package list page.

Documentation

  • Update the GraphQL Reference documentation

Permissions

  • Permissions to use the API will be limited to Admin+ (the same for deleting a single package.

Related to #227715 (closed). Related to #342436 (closed).

Edited by Tim Rizzi