summaryrefslogtreecommitdiff
path: root/app/graphql/mutations/todos/base.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/mutations/todos/base.rb')
-rw-r--r--app/graphql/mutations/todos/base.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/graphql/mutations/todos/base.rb b/app/graphql/mutations/todos/base.rb
index b6c7b320be1..2a72019fbac 100644
--- a/app/graphql/mutations/todos/base.rb
+++ b/app/graphql/mutations/todos/base.rb
@@ -9,6 +9,12 @@ module Mutations
GitlabSchema.object_from_id(id)
end
+ def map_to_global_ids(ids)
+ return [] if ids.blank?
+
+ ids.map { |id| to_global_id(id) }
+ end
+
def to_global_id(id)
::URI::GID.build(app: GlobalID.app, model_name: Todo.name, model_id: id, params: nil).to_s
end