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

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

module Resolvers
  class DownVotesCountResolver < BaseResolver
    include Gitlab::Graphql::Authorize::AuthorizeResource
    include BatchLoaders::AwardEmojiVotesBatchLoader

    type GraphQL::Types::Int, null: true

    def resolve
      authorize!(object)
      load_votes(object, AwardEmoji::DOWNVOTE_NAME)
    end
  end
end