Browse Source

fix: resolve tags on pages in GraphQL (#2247)

Marks Polakovs 4 years ago
parent
commit
95b6a7ad82
1 changed files with 3 additions and 0 deletions
  1. 3 0
      server/graph/resolvers/page.js

+ 3 - 0
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')
     // }