mirror of
https://github.com/strapi/strapi.git
synced 2025-07-23 17:10:08 +00:00
Use plugin in the GraphQL aggregation queries (#4508)
This commit is contained in:
parent
5f28916210
commit
aa534b1a5c
@ -358,12 +358,12 @@ const formatConnectionAggregator = function(fields, model, modelName) {
|
||||
|
||||
if (opts._q) {
|
||||
// allow search param
|
||||
return strapi.query(modelName).countSearch(opts);
|
||||
return strapi.query(modelName, model.plugin).countSearch(opts);
|
||||
}
|
||||
return strapi.query(modelName).count(opts);
|
||||
return strapi.query(modelName, model.plugin).count(opts);
|
||||
},
|
||||
totalCount(obj, options, context) {
|
||||
return strapi.query(modelName).count({});
|
||||
return strapi.query(modelName, model.plugin).count({});
|
||||
},
|
||||
},
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user