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 basicPackageType
-
PackageType
is the newPackageDetailsType
- Added a guard to
PackageDetailsResolver
to stop it from being executed more than once (similarly to how we do forGroupPackageResolver
)
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)
Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?-
I have included a changelog entry. -
I have not included a changelog entry because _____.
-
-
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
Related to #285467 (closed)
Edited by Nicolò Maria Mezzopera