Remove deprecated canDestroy and canDelete GraphQL fields
⚠
Warning The MR should be merged within the planned breaking changes window on GitLab.com 2024-05-06 09:00UTC
to 2024-05-08 22:00UTC
.
What does this MR do and why?
Following the Deprecation and removal process
the MR Removes the deprecated GraphQL field canDelete
from the following types:
ContainerRepository
ContainerRepositoryDetails
ContainerRepositoryTag
and removes the deprecated GraphQL field canDestroy
from the following types:
Package
PackageBase
PackageDetailsType
The fields were deprecated in the MRs:
-
canDelete
Add user_permissions field to ContainerReposito... (!136576 - merged) -
canDestroy
Add user_permissions fields to PackageType and ... (!135384 - merged)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
The field | GraphQL request |
---|---|
canDestroy |
|
canDelete |
How to set up and validate locally
canDestroy
field from Package
type
Run the following steps in rails console.
-
Create a new package.
def fixture_file_upload(*args, **kwargs) Rack::Test::UploadedFile.new(*args, **kwargs) end p = FactoryBot.create(:npm_package) p.id # We will need the package's ID in the next step
-
Visit http://gdk.test:3000/-/graphql-explorer and create a graphql query. The response should contain the error and the message
Field 'canDestroy' doesn't exist on type 'PackageDetailsType'
.query { package(id: "gid://gitlab/Packages::Package/<package_id>") { canDestroy } }
canDelete
field from ContainerRepositoryDetails
type
-
Get the
ID
of existingContainerRepository
in rails console.r = ContainerRepository.last r.id
-
Visit http://gdk.test:3000/-/graphql-explorer and create a graphql query. The response should contain the errors and the messages
"Field 'canDelete' doesn't exist on type 'ContainerRepositoryDetails'"
and"Field 'canDelete' doesn't exist on type 'ContainerRepositoryTag'"
query { containerRepository(id: "gid://gitlab/ContainerRepository/<Container Repository ID>") { canDelete tags { edges { node { canDelete } } } } }
Related to #390754 (closed)