Commit ef1420e8 authored by Alexandru Croitor's avatar Alexandru Croitor

Fix boards create and update mutations

Fix how ScopedBoardMutation module is included in both create and update
mutations for EE
parent ace3a8f4
......@@ -30,6 +30,8 @@ module Mutations
}
end
private
def find_object(id:)
# TODO: remove this line when the compatibility layer is removed
# See: https://gitlab.com/gitlab-org/gitlab/-/issues/257883
......
......@@ -3975,6 +3975,11 @@ type CreateAnnotationPayload {
Autogenerated input type of CreateBoard
"""
input CreateBoardInput {
"""
The ID of user to be assigned to the board.
"""
assigneeId: UserID
"""
A unique identifier for the client performing the mutation.
"""
......@@ -3995,6 +4000,26 @@ input CreateBoardInput {
"""
hideClosedList: Boolean
"""
The ID of iteration to be assigned to the board.
"""
iterationId: IterationID
"""
The IDs of labels to be added to the board.
"""
labelIds: [LabelID!]
"""
Labels of the issue
"""
labels: [String!]
"""
The ID of milestone to be assigned to the board.
"""
milestoneId: MilestoneID
"""
The board name.
"""
......@@ -4004,6 +4029,11 @@ input CreateBoardInput {
The project full path the resource is associated with
"""
projectPath: ID
"""
The weight value to be assigned to the board.
"""
weight: Int
}
"""
......@@ -23394,6 +23424,11 @@ type UpdateBoardEpicUserPreferencesPayload {
Autogenerated input type of UpdateBoard
"""
input UpdateBoardInput {
"""
The ID of user to be assigned to the board.
"""
assigneeId: UserID
"""
A unique identifier for the client performing the mutation.
"""
......@@ -23414,10 +23449,35 @@ input UpdateBoardInput {
"""
id: BoardID!
"""
The ID of iteration to be assigned to the board.
"""
iterationId: IterationID
"""
The IDs of labels to be added to the board.
"""
labelIds: [LabelID!]
"""
Labels of the issue
"""
labels: [String!]
"""
The ID of milestone to be assigned to the board.
"""
milestoneId: MilestoneID
"""
The board name.
"""
name: String
"""
The weight value to be assigned to the board.
"""
weight: Int
}
"""
......
......@@ -10964,6 +10964,82 @@
},
"defaultValue": null
},
{
"name": "assigneeId",
"description": "The ID of user to be assigned to the board.",
"type": {
"kind": "SCALAR",
"name": "UserID",
"ofType": null
},
"defaultValue": null
},
{
"name": "milestoneId",
"description": "The ID of milestone to be assigned to the board.",
"type": {
"kind": "SCALAR",
"name": "MilestoneID",
"ofType": null
},
"defaultValue": null
},
{
"name": "iterationId",
"description": "The ID of iteration to be assigned to the board.",
"type": {
"kind": "SCALAR",
"name": "IterationID",
"ofType": null
},
"defaultValue": null
},
{
"name": "weight",
"description": "The weight value to be assigned to the board.",
"type": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
},
"defaultValue": null
},
{
"name": "labels",
"description": "Labels of the issue",
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
}
},
"defaultValue": null
},
{
"name": "labelIds",
"description": "The IDs of labels to be added to the board.",
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "LabelID",
"ofType": null
}
}
},
"defaultValue": null
},
{
"name": "clientMutationId",
"description": "A unique identifier for the client performing the mutation.",
......@@ -68571,6 +68647,82 @@
},
"defaultValue": null
},
{
"name": "assigneeId",
"description": "The ID of user to be assigned to the board.",
"type": {
"kind": "SCALAR",
"name": "UserID",
"ofType": null
},
"defaultValue": null
},
{
"name": "milestoneId",
"description": "The ID of milestone to be assigned to the board.",
"type": {
"kind": "SCALAR",
"name": "MilestoneID",
"ofType": null
},
"defaultValue": null
},
{
"name": "iterationId",
"description": "The ID of iteration to be assigned to the board.",
"type": {
"kind": "SCALAR",
"name": "IterationID",
"ofType": null
},
"defaultValue": null
},
{
"name": "weight",
"description": "The weight value to be assigned to the board.",
"type": {
"kind": "SCALAR",
"name": "Int",
"ofType": null
},
"defaultValue": null
},
{
"name": "labels",
"description": "Labels of the issue",
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
}
},
"defaultValue": null
},
{
"name": "labelIds",
"description": "The IDs of labels to be added to the board.",
"type": {
"kind": "LIST",
"name": null,
"ofType": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "LabelID",
"ofType": null
}
}
},
"defaultValue": null
},
{
"name": "clientMutationId",
"description": "A unique identifier for the client performing the mutation.",
......@@ -4,7 +4,12 @@ module EE
module Mutations
module Boards
module Create
extend ActiveSupport::Concern
include Mutations::Boards::ScopedBoardMutation
prepended do
include Mutations::Boards::ScopedBoardArguments
end
end
end
end
......
......@@ -34,7 +34,7 @@ module EE
argument :labels, [GraphQL::STRING_TYPE],
required: false,
description: copy_field_description(Types::IssueType, :labels)
description: copy_field_description(::Types::IssueType, :labels)
argument :label_ids, [::Types::GlobalIDType[::Label]],
required: false,
......
......@@ -4,12 +4,9 @@ module EE
module Mutations
module Boards
module ScopedBoardMutation
extend ActiveSupport::Concern
prepended do
include ScopedBoardArguments
end
extend ::Gitlab::Utils::Override
override :resolve
def resolve(**args)
parsed_params = parse_arguments(args)
......
......@@ -4,7 +4,12 @@ module EE
module Mutations
module Boards
module Update
extend ActiveSupport::Concern
include Mutations::Boards::ScopedBoardMutation
prepended do
include Mutations::Boards::ScopedBoardArguments
end
end
end
end
......
---
title: Fix boards create and update mutation arguments list
merge_request: 50266
author:
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment