From 9ebe75b250e77114f17e00c95c5b060410862ef9 Mon Sep 17 00:00:00 2001 From: Grzegorz Leoniec Date: Thu, 17 Jan 2019 22:04:00 +0100 Subject: [PATCH] Improved moderation page --- graphql/ModerationListQuery.js | 41 +++++++++++++++++++++++++++++++ pages/moderation/index.vue | 44 ++++------------------------------ 2 files changed, 45 insertions(+), 40 deletions(-) create mode 100644 graphql/ModerationListQuery.js diff --git a/graphql/ModerationListQuery.js b/graphql/ModerationListQuery.js new file mode 100644 index 000000000..6126521cc --- /dev/null +++ b/graphql/ModerationListQuery.js @@ -0,0 +1,41 @@ +import gql from 'graphql-tag' + +export default app => { + return gql(` + query { + Report(first: 20, orderBy: createdAt_desc) { + id + description + type + createdAt + reporter { + name + slug + } + user { + name + slug + } + comment { + contentExcerpt + author { + name + slug + } + post { + title + slug + } + } + contribution { + title + slug + author { + name + slug + } + } + } + } + `) +} diff --git a/pages/moderation/index.vue b/pages/moderation/index.vue index 216252f85..dea7e9eac 100644 --- a/pages/moderation/index.vue +++ b/pages/moderation/index.vue @@ -85,6 +85,7 @@