Welcome to mirror list, hosted at ThFree Co, Russian Federation.

group_member_type.rb « types « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ffffa3247dbcfad5c4a5fdb47cfa21b83db680b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

module Types
  class GroupMemberType < BaseObject
    expose_permissions Types::PermissionTypes::Group
    authorize :read_group

    implements MemberInterface

    graphql_name 'GroupMember'
    description 'Represents a Group Member'

    field :group, Types::GroupType, null: true,
          description: 'Group that a User is a member of',
          resolve: -> (obj, _args, _ctx) { Gitlab::Graphql::Loaders::BatchModelLoader.new(Group, obj.source_id).find }
  end
end