diff --git a/graphql/UserProfileQuery.js b/graphql/UserProfileQuery.js index d2c37844e..a490fe2de 100644 --- a/graphql/UserProfileQuery.js +++ b/graphql/UserProfileQuery.js @@ -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 } diff --git a/pages/index.vue b/pages/index.vue index 97acc7d8c..14f5f64c2 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -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 - } - } } } `),