Add Redirection Routes for ProjectStatistics fields
What does this MR do and why?
Added a Graphql type and redirection urls for ProjectStatistics fields in the ProjectType
ref: https://gitlab.com/gitlab-org/gitlab/-/issues/406264
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
- Validate GraphQL projects have statisticsRedirects in them, visit http://127.0.0.1:3000/-/graphql-explorer and use the following query
{
projects {
edges {
node {
id
statisticsDetailsPaths {
repository
buildArtifacts
wiki
packages
snippets
containerRegistry
}
}
}
}
}
- Validate that
statisticsDetailsPaths
is returned with valid urls - Check for a valid response
{
"data": {
"projects": {
"edges": [
{
"node": {
"id": "gid://gitlab/Project/23",
"statisticsDetailsPaths": {
"repository": "http://127.0.0.1:3000/expiry-storage-test/first-proj/-/tree/main",
"buildArtifacts": "http://127.0.0.1:3000/expiry-storage-test/first-proj/-/artifacts",
"wiki": "http://127.0.0.1:3000/expiry-storage-test/first-proj/-/wikis/pages",
"packages": "http://127.0.0.1:3000/expiry-storage-test/first-proj/-/packages",
"snippets": "http://127.0.0.1:3000/expiry-storage-test/first-proj/-/snippets",
"containerRegistry": "http://127.0.0.1:3000/expiry-storage-test/first-proj/container_registry"
}
}
},
{
"node": {
"id": "gid://gitlab/Project/22",
"statisticsDetailsPaths": {
"repository": "http://127.0.0.1:3000/testgrpte/alpha/-/tree/main",
"buildArtifacts": "http://127.0.0.1:3000/testgrpte/alpha/-/artifacts",
"wiki": "http://127.0.0.1:3000/testgrpte/alpha/-/wikis/pages",
"packages": "http://127.0.0.1:3000/testgrpte/alpha/-/packages",
"snippets": "http://127.0.0.1:3000/testgrpte/alpha/-/snippets",
"containerRegistry": "http://127.0.0.1:3000/testgrpte/alpha/container_registry"
}
}
}
]
}
}
}
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.
Edited by Suraj Tripathi