From e9121705a426dc70e1c8ebf2ccd97d94e24636bd Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Fri, 7 Jul 2023 07:19:35 +0200 Subject: [PATCH 1/2] fix createPost query to not fail due to apollo cache --- webapp/graphql/PostMutations.js | 1 + 1 file changed, 1 insertion(+) diff --git a/webapp/graphql/PostMutations.js b/webapp/graphql/PostMutations.js index c3a9369c3..73e9f8ebe 100644 --- a/webapp/graphql/PostMutations.js +++ b/webapp/graphql/PostMutations.js @@ -39,6 +39,7 @@ export default () => { deleted postType author { + id name } categories { From d42bc2ea3cbef02b1742b26301a4990f65ee0248 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Fri, 7 Jul 2023 07:19:52 +0200 Subject: [PATCH 2/2] fix notifications in case no previous result is present --- webapp/components/NotificationMenu/NotificationMenu.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/components/NotificationMenu/NotificationMenu.vue b/webapp/components/NotificationMenu/NotificationMenu.vue index a8609f582..72f539a42 100644 --- a/webapp/components/NotificationMenu/NotificationMenu.vue +++ b/webapp/components/NotificationMenu/NotificationMenu.vue @@ -149,7 +149,7 @@ export default { return { notifications: unionBy( [newNotification], - previousResult.notifications, + previousResult?.notifications, (notification) => notification.id, ).sort((a, b) => new Date(b.updatedAt) - new Date(a.updatedAt)), }