mirror of
https://github.com/wassname/talk.git
synced 2026-07-07 23:11:14 +08:00
Adds Tags to the graphql.
This commit is contained in:
@@ -60,13 +60,6 @@ class Comment extends React.Component {
|
||||
body: PropTypes.string.isRequired,
|
||||
id: PropTypes.string.isRequired
|
||||
})),
|
||||
tags: PropTypes.arrayOf(
|
||||
PropTypes.shape({
|
||||
name: PropTypes.string,
|
||||
assigned_by: PropTypes.string,
|
||||
created_at: PropTypes.string
|
||||
})
|
||||
),
|
||||
user: PropTypes.shape({
|
||||
id: PropTypes.string.isRequired,
|
||||
name: PropTypes.string.isRequired
|
||||
|
||||
@@ -3,6 +3,9 @@ fragment commentView on Comment {
|
||||
body
|
||||
created_at
|
||||
status
|
||||
tags {
|
||||
name
|
||||
}
|
||||
user {
|
||||
id
|
||||
name: displayName
|
||||
|
||||
@@ -11,7 +11,7 @@ export default class TagLabel extends Component {
|
||||
<div
|
||||
className={`${packagename}-text`}
|
||||
className={`${styles.tagLabel}`}>
|
||||
{tags && tags}
|
||||
{tags}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -63,12 +63,26 @@ type User {
|
||||
comments(query: CommentsQuery): [Comment]
|
||||
}
|
||||
|
||||
type Tag {
|
||||
# the actual tag for the comment.
|
||||
name: COMMENT_TAG
|
||||
|
||||
# the user that assigned the tag. If NULL then the system automatically tagged it.
|
||||
assigned_by: User
|
||||
|
||||
# the time when the tag was assigned.
|
||||
created_at: Date!
|
||||
}
|
||||
|
||||
type Comment {
|
||||
id: ID!
|
||||
|
||||
# the actual comment data.
|
||||
body: String!
|
||||
|
||||
# the tags on the comment
|
||||
tags: [Tag]
|
||||
|
||||
# the user who authored the comment.
|
||||
user: User
|
||||
|
||||
@@ -165,6 +179,11 @@ type Asset {
|
||||
created_at: Date
|
||||
}
|
||||
|
||||
enum COMMENT_TAG {
|
||||
# For the comments submitted by staff members (ADMIN or MODERATOR users).
|
||||
STAFF
|
||||
}
|
||||
|
||||
enum COMMENT_STATUS {
|
||||
ACCEPTED
|
||||
REJECTED
|
||||
|
||||
Reference in New Issue
Block a user