
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
typeorm-query-params-parser
Advanced tools
A simple and flexible query parameter parser for TypeORM's QueryBuilder.
withDeleted)npm install typeorm-query-params-parser
# or
yarn add typeorm-query-params-parser
import { TypeORMQueryParser } from "typeorm-query-params-parser";
const query = request.query;
const queryBuilder = createQueryBuilder(Entity, "entity");
const queryParser = new TypeORMQueryParser(queryBuilder);
queryParser.parse(query);
// Continue using `queryBuilder` as needed
const results = await queryBuilder.getMany();
selectSpecify which fields to return. Use dot notation for nested fields.
Examples:
Select id, name, and profile.id:
{ "select": ["id", "name", "profile.id"] }
Select all fields of profile:
{ "select": ["id", "name", "profile.*"] }
relationsLeft join relations. Use dot notation for nested relations.
Example:
Join profile and its photo:
{ "relations": ["profile", "profile.photo"] }
sortSort by one or more fields. Prefix with - for descending order.
Example:
Sort by id ascending and name descending:
{ "sort": ["id", "-name"] }
limitSet the maximum number of items returned (default: 20).
Example:
{ "limit": 100 }
pageSpecify the page number for pagination (default: 1).
Example:
{ "page": 2 }
paginateEnable or disable pagination (default: true).
Example:
{ "paginate": false }
cacheEnable/disable cache, set cache duration (ms), or provide cache ID.
Examples:
Enable cache:
{ "cache": true }
Set cache duration:
{ "cache": 1000 }
Set cache ID and duration:
{ "cache": ["my-cache-id", 1000] }
withDeletedInclude soft-deleted entities.
Example:
{ "withDeleted": true }
filterAdvanced filtering using comparison and logical operators.
{
"filter": {
"<field>": { "<operator>": "<value>" }
}
}
| Operator | Description |
|---|---|
_eq | Equal to |
_neq | Not equal to |
_lt | Less than |
_lte | Less than or equal to |
_gt | Greater than |
_gte | Greater than or equal to |
_in | Value is in array |
_null | Is null (true) or not null (false) |
_contains | Contains substring |
_starts_with | Starts with substring |
_ends_with | Ends with substring |
_between | Value is between two values |
_empty | Is empty (true) or not empty (false) |
Filter by name:
{
"filter": {
"name": { "_eq": "Erick" }
}
}
Filter by categories:
{
"filter": {
"categories": { "_in": ["vegetables", "fruit"] }
}
}
Combine multiple conditions with _and or _or:
{
"filter": {
"_and": [
{
"title": { "_eq": "Readme" }
},
{
"status": { "_eq": "published" }
}
],
"_or": [
{
"title": { "_eq": "Readme" }
},
{
"status": { "_eq": "published" }
}
]
}
}
FAQs
A simple query params parser for TypeORM query builder
We found that typeorm-query-params-parser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.