You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wiki/server/graph/schemas/comment.graphql

83 lines
1.4 KiB

# ===============================================
# COMMENT
# ===============================================
extend type Query {
commentsProviders: [CommentProvider]
comments(
locale: String!
path: String!
): [CommentPost]!
commentById(
id: Int!
): CommentPost
}
extend type Mutation {
updateCommentsProviders(
providers: [CommentProviderInput]
): DefaultResponse
createComment(
pageId: Int!
replyTo: Int
content: String!
guestName: String
guestEmail: String
): CommentCreateResponse @rateLimit(limit: 1, duration: 15)
updateComment(
id: Int!
content: String!
): CommentUpdateResponse
deleteComment(
id: Int!
): DefaultResponse
}
# -----------------------------------------------
# TYPES
# -----------------------------------------------
type CommentProvider {
isEnabled: Boolean
key: String
title: String
description: String
logo: String
website: String
isAvailable: Boolean
config: [KeyValuePair]
}
input CommentProviderInput {
isEnabled: Boolean!
key: String!
config: [KeyValuePairInput]
}
type CommentPost {
id: Int
content: String
render: String
authorId: Int
authorName: String
authorEmail: String
authorIP: String
createdAt: Date
updatedAt: Date
}
type CommentCreateResponse {
operation: Operation
id: Int
}
type CommentUpdateResponse {
operation: Operation
render: String
}