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

abuse_report_labels_resolver.rb « resolvers « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 86cebe8e541f5778896bf260f8ff0b81603d8ff0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

module Resolvers
  class AbuseReportLabelsResolver < BaseResolver
    include Gitlab::Graphql::Authorize::AuthorizeResource

    authorize :read_label

    type Types::LabelType.connection_type, null: true

    argument :search_term, GraphQL::Types::String,
      required: false,
      description: 'Search term to find labels with.'

    def resolve(**args)
      ::Admin::AbuseReportLabelsFinder.new(context[:current_user], args).execute
    end
  end
end