i just replace sort with orderBy and its work for me following Knex Syntax
here is my sample code in-case anyone face same issue
const player = await strapi.db.query('api::player.player').findOne({
where: {
$and: [{ slug: { $eq: slug } }, { publishedAt: { $not: null } }]
},
populate: {
club: {
populate: {
players: {
orderBy: [{ fullname: 'asc' }]
}
}
}
}
});```