40 lines
698 B
GraphQL
40 lines
698 B
GraphQL
mutation CreateMessage(
|
|
$conversationId: UUID!,
|
|
$senderName: String!,
|
|
$content: String!,
|
|
$readBy: String
|
|
) @auth(level: USER) {
|
|
message_insert(
|
|
data: {
|
|
conversationId: $conversationId
|
|
senderName: $senderName
|
|
content: $content
|
|
readBy: $readBy
|
|
}
|
|
)
|
|
}
|
|
|
|
mutation UpdateMessage(
|
|
$id: UUID!,
|
|
$conversationId: UUID,
|
|
$senderName: String,
|
|
$content: String,
|
|
$readBy: String
|
|
) @auth(level: USER) {
|
|
message_update(
|
|
id: $id,
|
|
data: {
|
|
conversationId: $conversationId
|
|
senderName: $senderName
|
|
content: $content
|
|
readBy: $readBy
|
|
}
|
|
)
|
|
}
|
|
|
|
mutation DeleteMessage(
|
|
$id: UUID!
|
|
) @auth(level: USER) {
|
|
message_delete(id: $id)
|
|
}
|