From 95b6a7ad823803b3452169196935426c2a2345f0 Mon Sep 17 00:00:00 2001 From: Marks Polakovs Date: Mon, 10 Aug 2020 02:04:44 +0200 Subject: [PATCH] fix: resolve tags on pages in GraphQL (#2247) --- server/graph/resolvers/page.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/graph/resolvers/page.js b/server/graph/resolvers/page.js index ac0d6d4d..e60ab8d4 100644 --- a/server/graph/resolvers/page.js +++ b/server/graph/resolvers/page.js @@ -565,6 +565,9 @@ module.exports = { } }, Page: { + async tags (obj) { + return await WIKI.models.pages.relatedQuery('tags').for(obj.id) + } // comments(pg) { // return pg.$relatedQuery('comments') // }