Skip to content

Instantly share code, notes, and snippets.

@SachaG
Created April 26, 2017 01:18
Show Gist options
  • Save SachaG/5b36c8a70bc6164dfd03a914a485882f to your computer and use it in GitHub Desktop.
Save SachaG/5b36c8a70bc6164dfd03a914a485882f to your computer and use it in GitHub Desktop.
query postsListQuery($terms: JSON) {
postsTotal(terms: $terms)
postsList(terms: $terms) {
__typename
...PostsList
}
}
fragment PostsList on Post {
# vulcan:posts
_id
title
url
slug
postedAt
createdAt
sticky
status
body
htmlBody
excerpt
viewCount
clickCount
# vulcan:users
userId
user {
...UsersMinimumInfo
}
# vulcan:embedly
thumbnailUrl
# vulcan:categories
categories {
...CategoriesMinimumInfo
}
# vulcan:comments
commentCount
commenters {
...UsersMinimumInfo
}
# vulcan:voting
upvoters {
_id
}
downvoters {
_id
}
upvotes
downvotes
baseScore
score
}
fragment UsersMinimumInfo on User {
# vulcan:users
_id
slug
username
displayName
emailHash
}
fragment CategoriesMinimumInfo on Category {
# vulcan:categories
_id
name
slug
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment