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

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

16 lines
355 B
Ruby
Raw Normal View History

2022-11-25 23:54:43 +05:30
# frozen_string_literal: true
module Resolvers
class UpVotesCountResolver < BaseResolver
include Gitlab::Graphql::Authorize::AuthorizeResource
include BatchLoaders::AwardEmojiVotesBatchLoader
type GraphQL::Types::Int, null: true
def resolve
authorize!(object)
load_votes(object, AwardEmoji::UPVOTE_NAME)
end
end
end