Replace query builder

I am developing a plugin and I need to modify some of the queries before I send them to the db. I have tried to use db subscriptions class but it is not enough for me. I need to modify the query builder class. Right now I am patching this class which works but I need to find a cleaner way to do it. Is there any way to replace this class in the bootstrap or register hooks? Any suggestions help me a lot.


You could see if strapi.entityService.decorate is the solution for you. this will be ran on all quarry’s
example of i18n using it.

1 Like

@Boegie19 Thanks, This is actually useful. Is there any documentation about it out there?

Not to my knowledge.

1 Like