Add GraphQL fields for Catalog resources
What does this MR do and why?
This MR adds the basic structure for fetching CI catalog resources using GraphQL. It adds a Ci::Catalog::ResourceType
, a Resolvers::Ci::Catalog::ResourceResolver
, and a ci_catalog_resources
field to QueryType
.
Screenshots or screen recordings
How to set up and validate locally
- In the Rails console, run
Feature.enable(:ci_private_catalog_beta)
- Choose a namespace with at least one project. Find that project's ID
- In the Rails console, create a CI catalog resource with:
::Ci::Catalog::Resource.create(project: Project.find(<project_id>))
- In
/-/graphql-explorer
, use this query:query { ciCatalogResources(projectPath: "<project_path>") { count nodes { description icon name } } }
- See that you get the expected catalog resource. The name and description should match the name and description of the project. The icon should be the avatar path of the project.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #393567 (closed)
Edited by Avielle Wolfe