4

We're very familiar with IBM's Loopback and we're exploring/comparing NestJS as an alternative.

First and main topic: One feature that has always been an overall pleasure to work with is Loopback's built-in REST API's for its models together with the GraphQL-like querying that is supported both in the TypeScript API and as part of the REST API's themselves. It's been a pleasure to be able to include as many levels of depth of related entities as we like, add in other filtering and limit/scope to include certain fields. (This gives a gist of the feature: https://loopback.io/doc/en/lb4/Include-filter.html)

Is this possible to achieve in the NestJS world? I see a RelationalQueryBuilder for NestJS that is built-in (https://orkhan.gitbook.io/typeorm/docs/relational-query-builder) but I don't see it connected to a built in REST API and it looks a bit less sophisticated with its relations querying capability. Here are some decorators for CRUD REST in NestJS, but without the querying support (https://github.com/nestjsx/crud/wiki/Controllers#api-endpoints).

Also mature polymorphic relations support in Loopback seems like a strong differentiator for Loopback vs. an emerging extension for polymorphic relationships in NestJS (https://github.com/bashleigh/typeorm-polymorphic... thank you bashleigh!). Any success/thoughts opinions here?

How is working with MongoDB with NestJS (and TypeORM or Mongoose are the options)?

It seems like the first feature and main topic (built-in REST API's with fluent querying) may be one that really sets Loopback apart.

Robert Taylor
  • 459
  • 1
  • 4
  • 9
  • Did you ever find a good answer to this? – Eric Hartford Dec 19 '21 at 04:29
  • @EricHartford Unfortunately never found a good answer on this. Strong support for polymorphic relationships were finally completed and merged into core Loopback 4 (they weren't done at the time of this writing), so we ended up rolling with Loopback. Would love to see these features and strengths appear in the NestJS ecosystem - they are just awesomely convenient and powerful. – Robert Taylor Aug 17 '22 at 03:56

0 Answers0