GraphQL Deployment permissions
What does this MR do and why?
This MR exposes permissions related to Deployment through expose_permissions
. This unblocks the frontend work scheduled in Convert Environment Details page from HAML to V... (#23036 - closed).
Related #371953 (closed)
Screenshots or screen recordings
GraphQL query example:
{
project(fullPath: "dosuken-org/deployment-approval-test") {
environment(name: "production") {
id
deployments {
nodes {
userPermissions {
updateDeployment
destroyDeployment
}
}
}
}
}
}
Response example:
{
"data": {
"project": {
"environment": {
"id": "gid://gitlab/Environment/72",
"deployments": {
"nodes": [
{
"userPermissions": {
"updateDeployment": true,
"destroyDeployment": true
}
},
{
"userPermissions": {
"updateDeployment": true,
"destroyDeployment": true
}
},
{
"userPermissions": {
"updateDeployment": true,
"destroyDeployment": true
}
},
{
"userPermissions": {
"updateDeployment": true,
"destroyDeployment": true
}
},
{
"userPermissions": {
"updateDeployment": true,
"destroyDeployment": true
}
}
]
}
}
}
}
}
Added queries for preloading
Query Plan
https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/13633/commands/47867
Raw SQL
SELECT "p_ci_builds_metadata".* FROM "p_ci_builds_metadata" WHERE "p_ci_builds_metadata"."build_id" IN (1, 2, 3, 4, 9, 10, 11, 15, 16, 17)
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
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 Shinya Maeda