summaryrefslogtreecommitdiff
path: root/app/graphql/types/group_invitation_type.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/group_invitation_type.rb')
-rw-r--r--app/graphql/types/group_invitation_type.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/graphql/types/group_invitation_type.rb b/app/graphql/types/group_invitation_type.rb
index 0372ce178ff..efb0c8a41c8 100644
--- a/app/graphql/types/group_invitation_type.rb
+++ b/app/graphql/types/group_invitation_type.rb
@@ -11,7 +11,10 @@ module Types
description 'Represents a Group Invitation'
field :group, Types::GroupType, null: true,
- description: 'Group that a User is invited to',
- resolve: -> (obj, _args, _ctx) { Gitlab::Graphql::Loaders::BatchModelLoader.new(Group, obj.source_id).find }
+ description: 'Group that a User is invited to'
+
+ def group
+ Gitlab::Graphql::Loaders::BatchModelLoader.new(Group, object.source_id).find
+ end
end
end