Ocelot-Social/graphql/UserProfileQuery.js
2018-10-16 14:41:54 +02:00

61 lines
984 B
JavaScript

import gql from 'graphql-tag'
export default gql(`
query User($slug: String!) {
User(slug: $slug) {
id
name
avatar
friendsCount
friends {
id
name
slug
avatar
}
badgesCount
shoutedCount
commentsCount
followingCount
following {
id
name
slug
avatar
followedByCount
contributionsCount
commentsCount
}
followedByCount
followedBy {
id
name
slug
avatar
followedByCount
contributionsCount
commentsCount
}
contributionsCount
contributions {
Post {
id
slug
title
contentExcerpt
shoutedCount
commentsCount
image
author {
User {
id
avatar
name
}
}
}
}
}
}
`)