# Comment domain operations
query GetComment($id: ID!) {
  comment(id: $id) {
    id
    text
    createdAt
    updatedAt
    user { id username displayName }
    work { id name }
    translation { id name }
    parentComment { id }
  }
}

query Comments($workId: ID, $translationId: ID, $userId: ID, $limit: Int, $offset: Int) {
  comments(workId: $workId, translationId: $translationId, userId: $userId, limit: $limit, offset: $offset) {
    id
    text
    createdAt
    user { id username displayName }
  }
}

mutation CreateComment($input: CommentInput!) {
  createComment(input: $input) {
    id
    text
    createdAt
    user { id username }
  }
}

mutation UpdateComment($id: ID!, $input: CommentInput!) {
  updateComment(id: $id, input: $input) {
    id
    text
    updatedAt
  }
}

mutation DeleteComment($id: ID!) {
  deleteComment(id: $id)
}
