diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-18 09:09:24 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-18 09:09:24 +0000 |
commit | 4720b569f0fcbb47e9f1a60e95172ae63b6f065a (patch) | |
tree | 5c6bcecbca227e608753a57a9aad19ccfe0567b6 /app/graphql/mutations | |
parent | cefe554b7ce2d0b52f9de855be832a47c2bc24ab (diff) | |
download | gitlab-ce-4720b569f0fcbb47e9f1a60e95172ae63b6f065a.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/graphql/mutations')
-rw-r--r-- | app/graphql/mutations/issues/update.rb | 25 |
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') |