Commit 19d08365 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'fix-board-update-create-mutations' into 'master'

Fix boards create and update mutations

See merge request gitlab-org/gitlab!50266
parents 5f985108 ef1420e8
...@@ -30,6 +30,8 @@ module Mutations ...@@ -30,6 +30,8 @@ module Mutations
} }
end end
private
def find_object(id:) def find_object(id:)
# TODO: remove this line when the compatibility layer is removed # TODO: remove this line when the compatibility layer is removed
# See: https://gitlab.com/gitlab-org/gitlab/-/issues/257883 # See: https://gitlab.com/gitlab-org/gitlab/-/issues/257883
......
...@@ -3975,6 +3975,11 @@ type CreateAnnotationPayload { ...@@ -3975,6 +3975,11 @@ type CreateAnnotationPayload {
Autogenerated input type of CreateBoard Autogenerated input type of CreateBoard
""" """
input CreateBoardInput { input CreateBoardInput {
"""
The ID of user to be assigned to the board.
"""
assigneeId: UserID
""" """
A unique identifier for the client performing the mutation. A unique identifier for the client performing the mutation.
""" """
...@@ -3995,6 +4000,26 @@ input CreateBoardInput { ...@@ -3995,6 +4000,26 @@ input CreateBoardInput {
""" """
hideClosedList: Boolean 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. The board name.
""" """
...@@ -4004,6 +4029,11 @@ input CreateBoardInput { ...@@ -4004,6 +4029,11 @@ input CreateBoardInput {
The project full path the resource is associated with The project full path the resource is associated with
""" """
projectPath: ID projectPath: ID
"""
The weight value to be assigned to the board.
"""
weight: Int
} }
""" """
...@@ -23394,6 +23424,11 @@ type UpdateBoardEpicUserPreferencesPayload { ...@@ -23394,6 +23424,11 @@ type UpdateBoardEpicUserPreferencesPayload {
Autogenerated input type of UpdateBoard Autogenerated input type of UpdateBoard
""" """
input UpdateBoardInput { input UpdateBoardInput {
"""
The ID of user to be assigned to the board.
"""
assigneeId: UserID
""" """
A unique identifier for the client performing the mutation. A unique identifier for the client performing the mutation.
""" """
...@@ -23414,10 +23449,35 @@ input UpdateBoardInput { ...@@ -23414,10 +23449,35 @@ input UpdateBoardInput {
""" """
id: BoardID! 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. The board name.
""" """
name: String name: String
"""
The weight value to be assigned to the board.
"""
weight: Int
} }
""" """
......
...@@ -10964,6 +10964,82 @@ ...@@ -10964,6 +10964,82 @@
}, },
"defaultValue": null "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", "name": "clientMutationId",
"description": "A unique identifier for the client performing the mutation.", "description": "A unique identifier for the client performing the mutation.",
...@@ -68571,6 +68647,82 @@ ...@@ -68571,6 +68647,82 @@
}, },
"defaultValue": null "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", "name": "clientMutationId",
"description": "A unique identifier for the client performing the mutation.", "description": "A unique identifier for the client performing the mutation.",
...@@ -4,7 +4,12 @@ module EE ...@@ -4,7 +4,12 @@ module EE
module Mutations module Mutations
module Boards module Boards
module Create module Create
extend ActiveSupport::Concern
include Mutations::Boards::ScopedBoardMutation include Mutations::Boards::ScopedBoardMutation
prepended do
include Mutations::Boards::ScopedBoardArguments
end
end end
end end
end end
......
...@@ -34,7 +34,7 @@ module EE ...@@ -34,7 +34,7 @@ module EE
argument :labels, [GraphQL::STRING_TYPE], argument :labels, [GraphQL::STRING_TYPE],
required: false, required: false,
description: copy_field_description(Types::IssueType, :labels) description: copy_field_description(::Types::IssueType, :labels)
argument :label_ids, [::Types::GlobalIDType[::Label]], argument :label_ids, [::Types::GlobalIDType[::Label]],
required: false, required: false,
......
...@@ -4,12 +4,9 @@ module EE ...@@ -4,12 +4,9 @@ module EE
module Mutations module Mutations
module Boards module Boards
module ScopedBoardMutation module ScopedBoardMutation
extend ActiveSupport::Concern extend ::Gitlab::Utils::Override
prepended do
include ScopedBoardArguments
end
override :resolve
def resolve(**args) def resolve(**args)
parsed_params = parse_arguments(args) parsed_params = parse_arguments(args)
......
...@@ -4,7 +4,12 @@ module EE ...@@ -4,7 +4,12 @@ module EE
module Mutations module Mutations
module Boards module Boards
module Update module Update
extend ActiveSupport::Concern
include Mutations::Boards::ScopedBoardMutation include Mutations::Boards::ScopedBoardMutation
prepended do
include Mutations::Boards::ScopedBoardArguments
end
end end
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