Version 0.9.1
- Updated dependencies
- Added feature presented in the issue #34
- Added raw filters and sorting
Raw filters
Raw filters allow to get access to the user provided raw value right from the code. This feature allows to build your own filters interpreters.
How to use raw filters:
- Add
@Filter({ raw: true })
parameter with type ofRawFilterArgs<T>
whereT
is your filter type @Filter()
will return raw filter data.
@Query(() => [UserObjectType])
async usersRaw(
@Filter(() => [UserObjectType, UserFilterInputType], {sqlAlias: 'u', raw: true}) filter: RawFilterArgs<UserObjectType & UserFilterInputType>,
@Paginator() paginator: PaginatorArgs
) {
// Your customer filter logic..
return [];
}
Raw sorting
Raw sorting allows to get access to the user provided raw value right from the code. This feature allows to build your own sorting interpreters.
How to use raw filters:
- Add
@Sorting({ raw: true })
parameter with type ofRawSortingArgs<T>
whereT
is your filter type @Sorting()
will return raw sorting data.
@Query(() => [UserObjectType])
async usersRaw(
@Sorting(() => [UserObjectType], { sqlAlias: 'u', raw: true}) sorting: RawSortingArgs<UserObjectType>,
@Paginator() paginator: PaginatorArgs
) {
// Your customer filter logic..
return [];
}