Skip to content

Add Conan GraphQL type to package

What does this MR do?

This MR extends introduce support for

  • Files
  • Conan metadata.

By creating 3 new types

  • packages/conan/metadatum
  • packages/conan/file_metadatum
  • packages/package_file

Creating one union

  • packages/file_metadata

Refactoring the existing code:

  • PackageWithoutVersion is the new basic PackageType
  • PackageType is the new PackageDetailsType
  • Added a guard to PackageDetailsResolver to stop it from being executed more than once (similarly to how we do for GroupPackageResolver)

In particular this last step is done to address a big performance concern, where one could access the PackageType from a Project list and then ask for his versions introducing way too many queries, adding files to this mix made the problem even worse, so we ended up splitting details / list type.

Note:

To avoid breaking changes the types have not been renamed, so we will not break existing queries, an issue has been created to do the renaming at the next major version: #326488 (closed)

Screenshots (strongly suggested)

Screenshot_2021-04-01_at_14.13.54

Screenshot_2021-04-01_at_14.10.49

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

Related to #285467 (closed)

Edited by Nicolò Maria Mezzopera

Merge request reports