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

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

module Types
  class GroupInvitationType < BaseObject
    graphql_name 'GroupInvitation'
    description 'Represents a Group Invitation'

    expose_permissions Types::PermissionTypes::Group
    authorize :admin_group

    implements InvitationInterface

    field :group, Types::GroupType, null: true,
          description: 'Group that a User is invited to.'

    def group
      Gitlab::Graphql::Loaders::BatchModelLoader.new(Group, object.source_id).find
    end
  end
end