mirror of
https://github.com/strapi/strapi.git
synced 2025-07-25 01:49:34 +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) {
|
if (opts._q) {
|
||||||
// allow search param
|
// 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) {
|
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