mirror of
https://github.com/wassname/talk.git
synced 2026-09-10 12:43:11 +08:00
merge master
This commit is contained in:
+41
-15
@@ -42,13 +42,13 @@ type User {
|
||||
created_at: String!
|
||||
|
||||
# Action summaries against the user.
|
||||
action_summaries: [ActionSummary]!
|
||||
action_summaries: [ActionSummary!]!
|
||||
|
||||
# Actions completed on the parent.
|
||||
actions: [Action]
|
||||
actions: [Action!]
|
||||
|
||||
# the current roles of the user.
|
||||
roles: [USER_ROLES]
|
||||
roles: [USER_ROLES!]
|
||||
|
||||
# the current profiles of the user.
|
||||
profiles: [UserProfile]
|
||||
@@ -56,11 +56,11 @@ type User {
|
||||
# determines whether the user can edit their username
|
||||
canEditName: Boolean
|
||||
|
||||
# returns all comments based on a query.
|
||||
comments(query: CommentsQuery): [Comment]
|
||||
# ignored users.
|
||||
ignoredUsers: [User!]
|
||||
|
||||
# returns all users based on a query.
|
||||
users(query: UsersQuery): [User]
|
||||
# returns all comments based on a query.
|
||||
comments(query: CommentsQuery): [Comment!]
|
||||
|
||||
# returns user status
|
||||
status: USER_STATUS
|
||||
@@ -177,6 +177,11 @@ input CommentCountQuery {
|
||||
tag: [String]
|
||||
}
|
||||
|
||||
type EditInfo {
|
||||
edited: Boolean!
|
||||
editableUntil: Date
|
||||
}
|
||||
|
||||
# Comment is the base representation of user interaction in Talk.
|
||||
type Comment {
|
||||
|
||||
@@ -196,10 +201,10 @@ type Comment {
|
||||
user: User
|
||||
|
||||
# the recent replies made against this comment.
|
||||
recentReplies: [Comment]
|
||||
recentReplies: [Comment!]
|
||||
|
||||
# the replies that were made to the comment.
|
||||
replies(sort: SORT_ORDER = CHRONOLOGICAL, limit: Int = 3, excludeIgnored: Boolean): [Comment]
|
||||
replies(sort: SORT_ORDER = CHRONOLOGICAL, limit: Int = 3, excludeIgnored: Boolean): [Comment!]
|
||||
|
||||
# The count of replies on a comment.
|
||||
replyCount(excludeIgnored: Boolean): Int
|
||||
@@ -218,6 +223,9 @@ type Comment {
|
||||
|
||||
# The time when the comment was created
|
||||
created_at: Date!
|
||||
|
||||
# describes how the comment can be edited
|
||||
editing: EditInfo
|
||||
}
|
||||
|
||||
################################################################################
|
||||
@@ -432,10 +440,10 @@ type Asset {
|
||||
lastComment: Comment
|
||||
|
||||
# Returns recent comments
|
||||
recentComments: [Comment]
|
||||
recentComments: [Comment!]
|
||||
|
||||
# The top level comments that are attached to the asset.
|
||||
comments(sort: SORT_ORDER = REVERSE_CHRONOLOGICAL, limit: Int = 10, excludeIgnored: Boolean): [Comment]
|
||||
comments(sort: SORT_ORDER = REVERSE_CHRONOLOGICAL, limit: Int = 10, excludeIgnored: Boolean): [Comment!]
|
||||
|
||||
# The count of top level comments on the asset.
|
||||
commentCount(excludeIgnored: Boolean): Int
|
||||
@@ -542,7 +550,7 @@ type RootQuery {
|
||||
asset(id: ID, url: String): Asset
|
||||
|
||||
# Comments returned based on a query.
|
||||
comments(query: CommentsQuery!): [Comment]
|
||||
comments(query: CommentsQuery!): [Comment!]
|
||||
|
||||
# Return the count of comments satisfied by the query. Note that this edge is
|
||||
# expensive as it is not batched. Requires the `ADMIN` role.
|
||||
@@ -552,9 +560,6 @@ type RootQuery {
|
||||
# role.
|
||||
me: User
|
||||
|
||||
# Users that the currently logged in user ignores
|
||||
myIgnoredUsers: [User]
|
||||
|
||||
# Users returned based on a query.
|
||||
users(query: UsersQuery): [User]
|
||||
|
||||
@@ -609,6 +614,7 @@ enum TAG_TYPE {
|
||||
STAFF
|
||||
}
|
||||
|
||||
# CreateCommentInput is the input content used to create a new comment.
|
||||
input CreateCommentInput {
|
||||
|
||||
# The asset id
|
||||
@@ -738,6 +744,23 @@ type StopIgnoringUserResponse implements Response {
|
||||
errors: [UserError]
|
||||
}
|
||||
|
||||
# Input to editComment mutation.
|
||||
input EditCommentInput {
|
||||
|
||||
# Update body of the comment
|
||||
body: String!
|
||||
}
|
||||
|
||||
# EditCommentResponse contains the updated comment and any errors that occured.
|
||||
type EditCommentResponse implements Response {
|
||||
|
||||
# The edited comment.
|
||||
comment: Comment
|
||||
|
||||
# An array of errors relating to the mutation that occured.
|
||||
errors: [UserError]
|
||||
}
|
||||
|
||||
# All mutations for the application are defined on this object.
|
||||
type RootMutation {
|
||||
|
||||
@@ -753,6 +776,9 @@ type RootMutation {
|
||||
# Delete an action based on the action id.
|
||||
deleteAction(id: ID!): DeleteActionResponse
|
||||
|
||||
# Edit a comment
|
||||
editComment(id: ID!, asset_id: ID!, edit: EditCommentInput): EditCommentResponse
|
||||
|
||||
# Sets User status. Requires the `ADMIN` role.
|
||||
setUserStatus(id: ID!, status: USER_STATUS!): SetUserStatusResponse
|
||||
|
||||
|
||||
Reference in New Issue
Block a user