Skip to content

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 to ProjectType and GroupType
  • 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

Screenshot_2020-10-14_at_13.27.19

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

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
Edited by Markus Koller

Merge request reports