diff options
Diffstat (limited to 'app/graphql/mutations/issues')
-rw-r--r-- | app/graphql/mutations/issues/base.rb | 2 | ||||
-rw-r--r-- | app/graphql/mutations/issues/set_assignees.rb | 15 | ||||
-rw-r--r-- | app/graphql/mutations/issues/set_subscription.rb | 11 | ||||
-rw-r--r-- | app/graphql/mutations/issues/update.rb | 21 |
4 files changed, 48 insertions, 1 deletions
diff --git a/app/graphql/mutations/issues/base.rb b/app/graphql/mutations/issues/base.rb index 7c545c3eb00..529d48f3cd0 100644 --- a/app/graphql/mutations/issues/base.rb +++ b/app/graphql/mutations/issues/base.rb @@ -11,7 +11,7 @@ module Mutations argument :iid, GraphQL::STRING_TYPE, required: true, - description: "The iid of the issue to mutate" + description: "The IID of the issue to mutate" field :issue, Types::IssueType, diff --git a/app/graphql/mutations/issues/set_assignees.rb b/app/graphql/mutations/issues/set_assignees.rb new file mode 100644 index 00000000000..a4d1c755b53 --- /dev/null +++ b/app/graphql/mutations/issues/set_assignees.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +module Mutations + module Issues + class SetAssignees < Base + graphql_name 'IssueSetAssignees' + + include Assignable + + def update_service_class + ::Issues::UpdateService + end + end + end +end diff --git a/app/graphql/mutations/issues/set_subscription.rb b/app/graphql/mutations/issues/set_subscription.rb new file mode 100644 index 00000000000..a04c8f5ba2d --- /dev/null +++ b/app/graphql/mutations/issues/set_subscription.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Mutations + module Issues + class SetSubscription < Base + graphql_name 'IssueSetSubscription' + + include ResolvesSubscription + end + end +end diff --git a/app/graphql/mutations/issues/update.rb b/app/graphql/mutations/issues/update.rb index 7f6d9b0f988..cc03d32731b 100644 --- a/app/graphql/mutations/issues/update.rb +++ b/app/graphql/mutations/issues/update.rb @@ -25,6 +25,27 @@ module Mutations required: false, description: copy_field_description(Types::IssueType, :confidential) + argument :locked, + GraphQL::BOOLEAN_TYPE, + as: :discussion_locked, + required: false, + description: copy_field_description(Types::IssueType, :discussion_locked) + + argument :add_label_ids, + [GraphQL::ID_TYPE], + required: false, + description: 'The IDs of labels to be added to the issue.' + + argument :remove_label_ids, + [GraphQL::ID_TYPE], + required: false, + description: 'The IDs of labels to be removed from the issue.' + + argument :milestone_id, + GraphQL::ID_TYPE, + required: false, + description: 'The ID of the milestone to be assigned, milestone will be removed if set to null.' + def resolve(project_path:, iid:, **args) issue = authorized_find!(project_path: project_path, iid: iid) project = issue.project |