imporved queries

This commit is contained in:
Grzegorz Leoniec 2018-10-16 09:42:28 +02:00
parent c8b1125250
commit cf08efa19f
2 changed files with 18 additions and 19 deletions

View File

@ -14,7 +14,18 @@ export default gql(`
avatar
}
badgesCount
shoutedCount
commentsCount
followingCount
following {
id
name
slug
avatar
followedByCount
contributionsCount
commentsCount
}
followedByCount
contributionsCount
contributions {
@ -28,6 +39,7 @@ export default gql(`
image
author {
User {
id
avatar
name
}

View File

@ -46,7 +46,7 @@ export default {
Post: {
query: gql(`
query {
Post {
Post(first:10, orderBy: shoutedCount_desc) {
id
title
contentExcerpt
@ -54,34 +54,21 @@ export default {
image
author {
User {
id
avatar
slug
name
contributionsCount
shoutedCount
commentsCount
followedByCount
}
}
tags {
name
}
commentsCount
comments(orderBy: _id_desc) {
id
content
author {
User {
name
}
}
}
categories {
name
}
shoutedCount
shoutedBy {
name
friends {
name
}
}
}
}
`),