GraphQL API for container repositories
🌲 Context
This MR is part of my effort "improve Packages APIs" either by translating a Rest API to GraphQL or update the documentation.
Today's target: we're going to create a GraphQL mirror of the rest API for listing container repositories. Notice that we have two possible levels to list container repositories: at the project level or at the group level.
In addition to graphQLize a rest API, this MR also brings a first step to support a refactoring for the UI where the UI would use the GraphQL api instead of the rest one. In this regard, the attributes returned by the GraphQL should fill the needs of the UI page listing container repositories
🔍 What does this MR do?
- Add a new graphQL type:
ContainerRepositoryType
- Add a new resolver:
ContainerRepositoriesResolver
- With a support to search container repositories by name
- Add the
container_repositories
field toProjectType
andGroupType
- Where possible all the permissions checks have been ported from the rest API
- The underlying service is essentially the same as for the rest API
- Add all the relevant specs
📸 Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team