Query
Route handler parameter decorator. Extracts the query
property from the req object and populates the decorated
parameter with the value of query. May also apply pipes to the bound
query parameter.
@Query(property?: string | PipeTransform<any, any> | Type<PipeTransform<any, any>>, ...pipes: (PipeTransform<any, any> | Type<PipeTransform<any, any>>)[])
Parameters
| Option | Type | Description |
|---|---|---|
property
|
string | PipeTransform |
name of single property to extract from the
|
pipes
|
(PipeTransform |
one or more pipes to apply to the bound query parameter |
Returns
ParameterDecorator
See also
Description
For example:
async find(@Query('user') user: string)