Merge branch 'next' into next-passport

This commit is contained in:
Wyatt Johnson
2018-07-16 11:49:31 -06:00
89 changed files with 4045 additions and 1239 deletions
@@ -2,9 +2,10 @@ import { GQLCommentTypeResolver } from "talk-server/graph/tenant/schema/__genera
import { Comment } from "talk-server/models/comment";
const Comment: GQLCommentTypeResolver<Comment> = {
author: async (comment, args, ctx) =>
createdAt: comment => comment.created_at,
author: (comment, input, ctx) =>
ctx.loaders.Users.user.load(comment.author_id),
replies: async (comment, input, ctx) =>
replies: (comment, input, ctx) =>
ctx.loaders.Comments.forParent(comment.asset_id, comment.id, input),
};
@@ -402,6 +402,11 @@ type Comment {
"""
body: String
"""
createdAt is the date in which the comment was created.
"""
createdAt: Time
"""
author is the User that authored the Comment.
"""