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

12 lines
272 B
Ruby

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