Set required nullable for weight argument
What does this MR do and why?
- Update
Mutations::Issues::SetWeight
to userequired: nullable
for its argument. - Update
WeightInputType
to userequired: nullable
(this change is behind a FF that's not defaulted.)
How to set up and validate locally
Create a new issue and note its id
and iid
.
Mutations::Issues::SetWeight
Test For `Mutations::Issues::SetWeight`, execute the following mutations with different `weight` values including `null`.
mutation {
issueSetWeight(input: {projectPath: "root-group/root-project-1", iid: "17", weight: 100}) {
issue {
iid
weight
}
}
}
WeightInputType
Test Enable :work_items
FF
Feature.enable(:work_items)
Use this sample mutation with different weight values including null
.
If your issue has id=460
, use "gid://gitlab/WorkItem/460"
as the gid (this is because work item is practically an alias for issue at this point.)
null
.id=460
, use "gid://gitlab/WorkItem/460"
as the gid (this is because work item is practically an alias for issue at this point.)mutation {
workItemUpdate(
input: {id: "gid://gitlab/WorkItem/460", weightWidget: {weight: null}}
) {
workItem {
id
title
widgets {
... on WorkItemWidgetWeight {
weight
}
}
}
errors
}
}
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 #362550 (closed)
Edited by euko