Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-18 12:09:24 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-18 12:09:24 +0300
commit4720b569f0fcbb47e9f1a60e95172ae63b6f065a (patch)
tree5c6bcecbca227e608753a57a9aad19ccfe0567b6 /app/graphql/mutations/issues
parentcefe554b7ce2d0b52f9de855be832a47c2bc24ab (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/graphql/mutations/issues')
-rw-r--r--app/graphql/mutations/issues/update.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/app/graphql/mutations/issues/update.rb b/app/graphql/mutations/issues/update.rb
new file mode 100644
index 00000000000..119bc51e4a4
--- /dev/null
+++ b/app/graphql/mutations/issues/update.rb
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+module Mutations
+ module Issues
+ class Update < Base
+ graphql_name 'UpdateIssue'
+
+ # Add arguments here instead of creating separate mutations
+
+ def resolve(project_path:, iid:, **args)
+ issue = authorized_find!(project_path: project_path, iid: iid)
+ project = issue.project
+
+ ::Issues::UpdateService.new(project, current_user, args).execute(issue)
+
+ {
+ issue: issue,
+ errors: issue.errors.full_messages
+ }
+ end
+ end
+ end
+end
+
+Mutations::Issues::Update.prepend_if_ee('::EE::Mutations::Issues::Update')