Add a limited count field to registries
What does this MR do and why?
This MR adds a count field to the registries GraphQL types, depending on filters passed. This allows the UI to show how many registries record there are (up to the limit of 1000), given their status.
References
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
- Relates to: #520360 (closed)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
- Make sure you've got a secondary GDK site;
- Checkout this MR's branch on your secondary GDK;
- Access the GraphQL explorer at
/-/graphql-explorer; - Input a registry query containing a
count. For example:
query {
geoNode {
name
projectRepositoryRegistries {
count(limit: 10)
nodes {
id
}
}
}
}
- Add the Geo header in the Explorer's Header text box, in order to ensure the query runs on the secondary:
{ "REQUEST_PATH": "/api/v4/geo/node_proxy/2/graphql" }
- Press The arrow button to run the query!
No error message should appear unless the limit is exceeding 1000, and you should see the queried registries in the response.
Related to #520360 (closed)