query listMessage @auth(level: USER) {
  messages {
    id
    conversationId
    senderName
    content
    readBy
  }
}

query getMessageById(
  $id: UUID!
) @auth(level: USER) {
  message(id: $id) {
    id
    conversationId
    senderName
    content
    readBy
  }
}

query filterMessage(
  $conversationId: UUID,
  $senderName: String
) @auth(level: USER) {
  messages(
    where: {
      conversationId: { eq: $conversationId }
      senderName: { eq: $senderName }
    }
  ) {
    id
    conversationId
    senderName
    content
    readBy
  }
}
