Merge branch 'master' into asset-comment-metrics

This commit is contained in:
riley
2017-03-20 07:36:22 -07:00
committed by gaba
57 changed files with 1902 additions and 404 deletions
+32 -1
View File
@@ -31,7 +31,7 @@ type User {
username: String!
# Action summaries against the user.
action_summaries: [ActionSummary]
action_summaries: [FlagActionSummary]
# Actions completed on the parent.
actions: [Action]
@@ -45,6 +45,9 @@ type User {
# returns all comments based on a query.
comments(query: CommentsQuery): [Comment]
# returns all users based on a query.
users(query: UsersQuery): [User]
# returns user status
status: USER_STATUS
}
@@ -60,6 +63,20 @@ type Tag {
created_at: Date!
}
# UsersQuery allows the ability to query users by a specific fields.
input UsersQuery {
action_type: ACTION_TYPE
# Limit the number of results to be returned.
limit: Int = 10
# Skip results from the last created_at timestamp.
cursor: Date
# Sort the results by created_at.
sort: SORT_ORDER = REVERSE_CHRONOLOGICAL
}
################################################################################
## Comments
################################################################################
@@ -517,6 +534,9 @@ type RootQuery {
# role.
me: User
# Users returned based on a query.
users(query: UsersQuery): [User]
# Asset metrics related to user actions are saturated into the assets
# returned.
assetMetrics(from: Date!, to: Date!, sort: ASSET_METRICS_SORT!, limit: Int = 10): [Asset!]
@@ -650,6 +670,14 @@ type SetUserStatusResponse implements Response {
errors: [UserError]
}
# SuspendUserResponse is the response returned with possibly some errors
# relating to the suspend action attempt.
type SuspendUserResponse implements Response {
# An array of errors relating to the mutation that occurred.
errors: [UserError]
}
# SetCommentStatusResponse is the response returned with possibly some errors
# relating to the delete action attempt.
type SetCommentStatusResponse implements Response {
@@ -693,6 +721,9 @@ type RootMutation {
# Sets User status. Requires the `ADMIN` role.
setUserStatus(id: ID!, status: USER_STATUS!): SetUserStatusResponse
# Sets User status to BANNED and canEditName to true. Requires the `ADMIN` role.
suspendUser(id: ID!): SuspendUserResponse
# Sets Comment status. Requires the `ADMIN` role.
setCommentStatus(id: ID!, status: COMMENT_STATUS!): SetCommentStatusResponse