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

22 lines
484 B
Ruby
Raw Normal View History

2020-06-23 00:09:42 +05:30
# frozen_string_literal: true
module Resolvers
class ProjectMembersResolver < BaseResolver
argument :search, GraphQL::STRING_TYPE,
required: false,
description: 'Search query'
type Types::ProjectMemberType, null: true
alias_method :project, :object
def resolve(**args)
return Member.none unless project.present?
MembersFinder
.new(project, context[:current_user], params: args)
.execute
end
end
end