debian-mirror-gitlab/app/graphql/resolvers/work_item_resolver.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
485 B
Ruby
Raw Normal View History

2022-05-07 20:08:51 +05:30
# frozen_string_literal: true
module Resolvers
class WorkItemResolver < BaseResolver
include Gitlab::Graphql::Authorize::AuthorizeResource
authorize :read_work_item
type Types::WorkItemType, null: true
argument :id, ::Types::GlobalIDType[::WorkItem], required: true, description: 'Global ID of the work item.'
def resolve(id:)
2023-01-13 00:05:48 +05:30
authorized_find!(id: id)
2022-05-07 20:08:51 +05:30
end
private
def find_object(id:)
GitlabSchema.find_by_gid(id)
end
end
end