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

27 lines
571 B
Ruby
Raw Normal View History

2020-11-24 15:15:51 +05:30
# frozen_string_literal: true
module Resolvers
class GroupMembersResolver < MembersResolver
2021-01-29 00:20:46 +05:30
type Types::GroupMemberType.connection_type, null: true
2020-11-24 15:15:51 +05:30
authorize :read_group_member
2021-02-22 17:27:13 +05:30
argument :relations, [Types::GroupMemberRelationEnum],
description: 'Filter members by the given member relations',
required: false,
default_value: GroupMembersFinder::DEFAULT_RELATIONS
2020-11-24 15:15:51 +05:30
private
def preloads
{
user: [:user, :source]
}
end
def finder_class
GroupMembersFinder
end
end
end