I build graphql server based on the node.js, objection.js, objection-graphql, knex. I have about 200 models in the app and it worked good before I connect relations. Each model has in avarage 3 relation model, exist many loops, by this cause I use next construction for connecting relation model:
modelClass: path.join(__dirname, "tableName").
At the moment the requests are happening either 10+ times slower or I get an error like this:
Failed to connect to nameserver.com:443 in 15000ms
I analyzed sql queries, that build knex it seems that the problem with performance not with sql.
How to solve this problem?