mirror of
https://github.com/strapi/strapi.git
synced 2025-08-04 14:56:22 +00:00
Merge pull request #2226 from aissa-bouguern/patch-1
GraphQL many-to-many querying symmetry
This commit is contained in:
commit
2fbb53ce69
@ -398,7 +398,7 @@ module.exports = {
|
|||||||
queryOpts.skip = convertedParams.start;
|
queryOpts.skip = convertedParams.start;
|
||||||
|
|
||||||
switch (association.nature) {
|
switch (association.nature) {
|
||||||
case 'manyToMany': {
|
case 'manyToMany':
|
||||||
if (association.dominant) {
|
if (association.dominant) {
|
||||||
const arrayOfIds = (obj[association.alias] || []).map(
|
const arrayOfIds = (obj[association.alias] || []).map(
|
||||||
related => {
|
related => {
|
||||||
@ -413,8 +413,7 @@ module.exports = {
|
|||||||
[ref.primaryKey]: arrayOfIds,
|
[ref.primaryKey]: arrayOfIds,
|
||||||
...where.where,
|
...where.where,
|
||||||
}).where;
|
}).where;
|
||||||
}
|
break;
|
||||||
break;
|
|
||||||
// falls through
|
// falls through
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user