Update reports query in frontend

This commit is contained in:
mattwr18 2019-11-27 17:45:32 +01:00
parent c6f16497fa
commit 1f7d8a023e
2 changed files with 43 additions and 72 deletions

View File

@ -5,34 +5,14 @@ export const reportListQuery = () => {
return gql`
query {
reports(orderBy: createdAt_desc) {
id
createdAt
reasonCategory
reasonDescription
report {
id
createdAt
updatedAt
disable
closed
}
type
submitter {
id
slug
name
disabled
deleted
followedByCount
contributionsCount
commentedCount
}
user {
id
slug
name
disabled
deleted
reviewedByModerator {
updatedAt
disable
closed
to {
__typename
... on User {
id
slug
name
@ -42,60 +22,49 @@ export const reportListQuery = () => {
contributionsCount
commentedCount
}
followedByCount
contributionsCount
commentedCount
}
comment {
id
contentExcerpt
disabled
deleted
author {
... on Comment {
id
slug
name
contentExcerpt
disabled
deleted
followedByCount
contributionsCount
commentedCount
author {
id
slug
name
disabled
deleted
followedByCount
contributionsCount
commentedCount
}
post {
id
slug
title
disabled
deleted
}
}
post {
... on Post {
id
slug
title
disabled
deleted
}
reviewedByModerator {
id
slug
name
disabled
deleted
followedByCount
contributionsCount
commentedCount
author {
id
slug
name
disabled
deleted
followedByCount
contributionsCount
commentedCount
}
}
}
post {
id
slug
title
disabled
deleted
author {
id
slug
name
disabled
deleted
followedByCount
contributionsCount
commentedCount
}
reviewedByModerator {
reportsFiled {
submitter {
id
slug
name
@ -105,6 +74,9 @@ export const reportListQuery = () => {
contributionsCount
commentedCount
}
createdAt
reasonCategory
reasonDescription
}
}
}

View File

@ -386,8 +386,7 @@ export default {
return {}
},
update({ reports }) {
console.log(reports)
// this.resourcesClaims = reports
this.reports = reports
},
fetchPolicy: 'cache-and-network',
},