nestjsx / crud

NestJs CRUD for RESTful APIs
https://github.com/nestjsx/crud/wiki
MIT License
4.04k stars 533 forks source link

platform-fastify RequestQueryBuilder:The resulting queryString RESTful is not recognized #722

Closed jinpy666 closed 3 years ago

jinpy666 commented 3 years ago

The following is a queryString built by the RequestQueryBuilder, which is inconsistent with the results obtained on the Wiki.

Code:

RequestQueryBuilder.create()
            .setFilter(["deletedAt", CondOperator.NOT_NULL])
            .setFilter(["deletedAt2", CondOperator.NOT_NULL])
            .setFilter(["deletedAt3", CondOperator.NOT_NULL])
            .setIncludeDeleted(1)
            .query(false);

filter[0]=deletedAt||$notnull&filter[1]=deletedAt2||$notnull&filter[2]=deletedAt3||$notnull&include_deleted=1

image

jinpy666 commented 3 years ago

The problem was solved because I was using @nestjs/platform-fastify, which doesn't support complex QueryStrings, and I finally solved the problem with fastify-qs.