Introduction to TypeORM QueryBuilder
QueryBuilder allows developers to build SQL queries using a fluent API, executing them to receive automatically transformed entities. It abstracts raw SQL while providing a convenient syntax for complex queries.const firstUser = await connection
.getRepository(User)
.createQueryBuilder("user")
.where("user.id = :id", { id: 1 })
.getOne();