- GET_USER =
"
query userByUsername($username: String!) {
user: userByUsername(username: $username) {
#{Fields::USER}
}
}
"
- GET_USER_BY_ID =
"
query user($user_id: Int!) {
user: user(id: $user_id) {
#{Fields::USER}
}
}
"
- USER_SEARCH =
"
query usernameSearch($username: String!, $count: Int) {
usernameSearch(query: $username, limit: $count) {
#{Fields::USER}
}
}
"
- GET_USER_POSTS =
"
query user($username: String!, $after: String, $order: String, $count: Int) {
user: userByUsername(username: $username) {
posts(after: $after, order: $order, count: $count) {
items {
#{Fields::POST}
}
}
}
}
"
"
query user($username: String!, $after: String, $order: String, $count: Int) {
user: userByUsername(username: $username) {
comments(after: $after, order: $order, count: $count) {
items {
#{Fields::COMMENT}
}
}
}
}
"
- GET_USER_REPLS =
"
query user($username: String!, $count: Int, $order: String, $direction: String, $before: String, $after: String, $pinnedReplsFirst: Boolean, $showUnnamed: Boolean) {
user: userByUsername(username: $username) {
publicRepls(count: $count, order: $order, direction: $direction, before: $before, after: $after, pinnedReplsFirst: $pinnedReplsFirst, showUnnamed: $showUnnamed) {
items {
#{Fields::REPL}
}
}
}
}
"
- GET_POST =
"
query post($id: Int!) {
post(id: $id) {
#{Fields::POST}
}
}
"
"
query post($postId: Int!, $order: String, $count: Int, $after: String) {
post(id: $postId) {
comments(order: $order, count: $count, after: $after) {
items {
#{Fields::COMMENT}
}
}
}
}
"
- GET_POSTS_UPVOTERS =
"
query post($id: Int!, $count: Int) {
post(id: $id) {
votes(count: $count) {
items {
user {
#{Fields::POST}
}
}
}
}
}
"
"
query comment ($id: Int!) {
comment(id: $id) {
#{Fields::COMMENT}
}
}
"
"
query comment ($id: Int!) {
comment(id: $id) {
comments {
#{Fields::COMMENT}
}
}
}
"
"
query comment ($id: Int!) {
comment(id: $id) {
parentComment {
#{Fields::COMMENT}
}
}
}
"
- GET_REPL =
"
query ReplView($url: String!) {
repl(url: $url) {
... on Repl {
#{Fields::REPL}
}
}
}
"
- GET_REPL_FORKS =
"
query ReplViewForks($url: String!, $count: Int!, $after: String) {
repl(url: $url) {
... on Repl {
publicForks(count: $count, after: $after) {
items {
#{Fields::REPL}
}
}
}
}
}
"
"
query ReplViewComments($url: String!, $count: Int, $after: String) {
repl(url: $url) {
... on Repl {
comments(count: $count, after: $after) {
items {
#{Fields::REPL_COMMENT}
replies {
#{Fields::REPL_COMMENT}
}
}
}
}
}
}
"
"
query ReplViewComment($id: Int!) {
replComment(id: $id) {
... on ReplComment {
#{Fields::REPL_COMMENT}
}
}
}
"
- GET_BOARD =
"
query boardBySlug($slug: String!) {
board: boardBySlug(slug: $slug) {
#{Fields::BOARD}
}
}
"
- GET_POSTS =
"
query ReplPostsFeed($options: ReplPostsQueryOptions) {
replPosts(options: $options) {
items {
#{Fields::POST}
}
}
}
"
- GET_EXPLORE_FEATURED_REPLS =
"
query ExploreFeaturedRepls {
featuredRepls {
#{Fields::REPL}
}
}
"
- GET_TAG =
"
query ExploreTrendingRepls($tag: String!) {
tag(id: $tag) {
#{Fields::TAG}
}
}
"
- GET_TRENDING_TAGS =
"
query ExploreFeed($count: Int) {
trendingTagsFeed(initialTagsCount: $count) {
initialTags {
#{Fields::TAG}
}
}
}
"
- GET_TAGS_REPLS =
"
query ExploreTrendingRepls($tag: String!, $count: Int, $after: String) {
tag(id: $tag) {
repls(limit: $count, after: $after) {
items {
#{Fields::REPL}
}
}
}
}
"