debian-mirror-gitlab/app/graphql/resolvers/down_votes_count_resolver.rb
2023-06-20 00:43:36 +05:30

12 lines
276 B
Ruby

# frozen_string_literal: true
module Resolvers
class DownVotesCountResolver < Resolvers::AwardEmoji::BaseVotesCountResolver
type GraphQL::Types::Int, null: true
def resolve
authorize!(object)
votes_batch_loader.load_downvotes(object)
end
end
end