Skip to content

Commit 1ffdcfe

Browse files
Merge pull request #350 from lara-learning/commented-report-missing
fix: Prevent 404 on old reports due to missing Comment.published field
2 parents 6a04252 + 4ee3676 commit 1ffdcfe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/backend/src/resolvers/comment.resolver.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ export const commentResolver: GqlResolvers<AuthenticatedContext> = {
3030
},
3131
},
3232
Comment: {
33+
published: (comment) => {
34+
return comment.published || false
35+
},
36+
3337
user: async (model, _args, { currentUser }) => {
3438
const user = await userById(model.userId)
3539

0 commit comments

Comments
 (0)