OData V4 query parser and compiler for TypeORM (0.1.2). Converts OData v4 query strings (e.g., $filter, $select, $orderby, $top, $skip, $expand, $apply) into TypeORM QueryBuilder or repository queries. Supports Express and NestJS middleware. Lightweight alternative to full OData frameworks. Limited to SQL databases; no NoSQL support. Regularly released but early-stage (0.x). Ships TypeScript definitions.
npm install odata-v4-typeormNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Express middleware that automatically parses OData v4 query parameters from the request URL and returns filtered/sorted/paginated data from a TypeORM repository.
Manually wrap the response with OData metadata if needed, or use a dedicated OData framework (e.g., odata-v4-server).
Upgrade to v0.1.0+ which includes basic $apply support for count, sum, min, max.
Update calls to executeQuery(repository, req.query) instead of executeQuery(repository, req.queryString).
Use TypeORM 0.2.x or wrap DataSource to provide Connection-compatible repository.
Use TypeORM's QueryBuilder with leftJoinAndSelect and pass a pre-built queryBuilder to executeQuery.
Use import { odataQuery } from 'odata-v4-typeorm';Ensure the repository is properly obtained via getRepository() or dependency injection.
Add the User entity to entities array in createConnection() or DataSource options.
Update to TypeORM 0.2.x or use dataSource.getRepository().