nestjsx / crud

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

BUG - sending too many joins breaks in the backend #748

Open tarekbazine opened 2 years ago

tarekbazine commented 2 years ago

Sending too many join relations from the frontend using requestQueryBuilder.setJoin({ field: name}), results in req.query.join here been an object and not an array, then parser.parseQuery(req.query) just ignore this object and you end up with no joins.

I am still not sure if the issue is in the request parsing from nestjs or in expressjs

But as a solution, I found that sending join[] in the URL params instead of join[x] (with x is the index) solves the issue ( since it always parse to an array )