Strapi v4 Bookshelf query builder similar to v3

198 Views Asked by At

So we’ve been using strapi v3 for quite many years and are now migrating our app to v4.

In v3 we could use bookshelf query builder to build our apis as per the v3 docs here: https://docs-v3.strapi.io/developer-docs/latest/development/backend-customization.html#queries

const result = await strapi
  .query('restaurant')
  .model.query(qb => {
    qb.where('id', 1);
  })
  .fetch();

We’re using such queries to a very complex with multiple joins and selects within a query in our backend to implement custom apis. But I’m not able to use this bookshelf query builder in v4. Am I missing something here? Or is it not supported at all?

Any help/guidance will be appreciated.

0

There are 0 best solutions below