Ocelot-Social/webapp/graphql/PostCommentsQuery.js
Matt Rider 40f5b6acd5 Extract CommentsList component
- this allows to Query for comments by Post
2019-05-02 21:03:31 -03:00

41 lines
810 B
JavaScript

import gql from 'graphql-tag'
export default app => {
const lang = app.$i18n.locale().toUpperCase()
return gql(`
query Post($slug: String!) {
Post(slug: $slug) {
commentsCount
comments(orderBy: createdAt_asc) {
id
contentExcerpt
createdAt
disabled
deleted
author {
id
slug
name
avatar
disabled
deleted
shoutedCount
contributionsCount
commentsCount
followedByCount
followedByCurrentUser
location {
name: name${lang}
}
badges {
id
key
icon
}
}
}
}
}
`)
}