mutation createMessage(
  $conversationId: UUID!,
  $senderId: String!,
  $content: String!,
  $isSystem: Boolean
) @auth(level: USER) {
  message_insert(
    data: {
      conversationId: $conversationId,
      senderId: $senderId,
      content: $content,
      isSystem: $isSystem
    }
  ) 
}

mutation updateMessage(
  $id: UUID!,
  $conversationId: UUID,
  $senderId: String,
  $content: String,
  $isSystem: Boolean
) @auth(level: USER) {
  message_update(
    id: $id,
    data: {
      conversationId: $conversationId,
      senderId: $senderId,
      content: $content,
      isSystem: $isSystem
    }
  ) 
}

mutation deleteMessage($id: UUID!) @auth(level: USER) {
  message_delete(id: $id) 
}
