diff --git a/app/graph/types/comment_type.rb b/app/graph/types/comment_type.rb index 8701ee04f..9078257af 100644 --- a/app/graph/types/comment_type.rb +++ b/app/graph/types/comment_type.rb @@ -14,4 +14,7 @@ CommentType = GraphQL::ObjectType.define do field :cached_votes_total, types.Int, "The total number of votes of this comment" field :cached_votes_up, types.Int, "The total number of upvotes of this comment" field :cached_votes_down, types.Int, "The total number of downvotes of this comment" + + # Linked resources + field :user, !UserType, "User who made this comment" end diff --git a/app/graph/types/proposal_type.rb b/app/graph/types/proposal_type.rb index 2bc1e37b0..1e3514997 100644 --- a/app/graph/types/proposal_type.rb +++ b/app/graph/types/proposal_type.rb @@ -19,5 +19,6 @@ ProposalType = GraphQL::ObjectType.define do field :retired_explanation, types.String, "Explanation why this proposal was retired" # Linked resources + field :author, UserType, "Author of this proposal" field :comments, !types[!CommentType], "Comments in this proposal" end