From a9f7049f2a8ddb2e465ab4de022fb6fbb211ae36 Mon Sep 17 00:00:00 2001 From: Grzegorz Leoniec Date: Tue, 23 Oct 2018 12:43:43 +0200 Subject: [PATCH] improved profile query --- graphql/UserProfileQuery.js | 48 ++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/graphql/UserProfileQuery.js b/graphql/UserProfileQuery.js index a3d14a377..68fa1c52c 100644 --- a/graphql/UserProfileQuery.js +++ b/graphql/UserProfileQuery.js @@ -13,11 +13,16 @@ export default gql(` slug avatar } + badges { + id + key + icon + } badgesCount shoutedCount commentsCount followingCount - following { + following(first: 7) { id name slug @@ -25,9 +30,14 @@ export default gql(` followedByCount contributionsCount commentsCount + badges { + id + key + icon + } } followedByCount - followedBy { + followedBy(first: 7) { id name slug @@ -35,23 +45,27 @@ export default gql(` followedByCount contributionsCount commentsCount + badges { + id + key + icon + } } contributionsCount - contributions { - Post { - id - slug - title - contentExcerpt - shoutedCount - commentsCount - image - author { - User { - id - avatar - name - } + contributions(first: 6) { + id + slug + title + contentExcerpt + shoutedCount + commentsCount + image + createdAt + author { + User { + id + avatar + name } } }