mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 18:33:55 +00:00
Convert GraphQL params to one level-deep object
This commit is contained in:
parent
4c3d5da8ee
commit
382f52a2e8
@ -398,7 +398,7 @@ module.exports = {
|
||||
queryOpts.skip = convertedParams.start;
|
||||
|
||||
switch (association.nature) {
|
||||
case 'manyToMany': {
|
||||
case 'manyToMany':
|
||||
if (association.dominant) {
|
||||
const arrayOfIds = (obj[association.alias] || []).map(
|
||||
related => {
|
||||
@ -413,10 +413,9 @@ module.exports = {
|
||||
[ref.primaryKey]: arrayOfIds,
|
||||
...where.where,
|
||||
}).where;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
// falls through
|
||||
}
|
||||
default:
|
||||
// Where.
|
||||
queryOpts.query = strapi.utils.models.convertParams(name, {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user