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

25 lines
526 B
Ruby
Raw Normal View History

2020-11-24 15:15:51 +05:30
# frozen_string_literal: true
module Resolvers
class MembersResolver < BaseResolver
include Gitlab::Graphql::Authorize::AuthorizeResource
include LooksAhead
argument :search, GraphQL::STRING_TYPE,
required: false,
description: 'Search query'
def resolve_with_lookahead(**args)
authorize!(object)
apply_lookahead(finder_class.new(object, current_user, params: args).execute)
end
private
def finder_class
# override in subclass
end
end
end