Implemented sortBy

This commit is contained in:
Wyatt Johnson
2017-08-22 10:11:47 -06:00
parent e0f9bb4165
commit b719168b18
10 changed files with 227 additions and 52 deletions
+20
View File
@@ -249,6 +249,10 @@ input CommentsQuery {
# Sort the results by from largest first.
sort: SORT_ORDER = DESC
# The order to sort the comments by, sorting by default the created at
# timestamp.
sortBy: SORT_COMMENTS_BY = CREATED_AT
# Filter by a specific tag name.
tags: [String!]
@@ -261,6 +265,10 @@ input RepliesQuery {
# Sort the results by from smallest first.
sort: SORT_ORDER = ASC
# The order to sort the comments by, sorting by default the created at
# timestamp.
sortBy: SORT_COMMENTS_BY = CREATED_AT
# Limit the number of results to be returned.
limit: Int = 3
@@ -660,6 +668,18 @@ enum SORT_ORDER {
ASC
}
# SORT_COMMENTS_BY selects the means for which comments are ordered when
# sorting.
enum SORT_COMMENTS_BY {
# Comments will be sorted by their created at date.
CREATED_AT
# Comments will be sorted by their immediate reply count (replies to the comment
# in question only, not including descendants).
REPLIES
}
# All queries that can be executed.
enum USER_STATUS {
ACTIVE