fixes bug with combining AND clauses, extends graphql id operations
This commit is contained in:
@@ -25,10 +25,15 @@ async function find(args) {
|
||||
const queryToBuild = {};
|
||||
|
||||
if (where) {
|
||||
let and = [];
|
||||
|
||||
if (Array.isArray(where.and)) and = where.and;
|
||||
if (Array.isArray(where.AND)) and = where.AND;
|
||||
|
||||
queryToBuild.where = {
|
||||
...where,
|
||||
and: [
|
||||
...(Array.isArray(where.and) ? where.and : []),
|
||||
...and,
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -292,7 +292,7 @@ const buildWhereInputType = (name, fields, parentName) => {
|
||||
'id',
|
||||
GraphQLString,
|
||||
parentName,
|
||||
['equals', 'not_equals'],
|
||||
['equals', 'not_equals', 'in', 'not_in'],
|
||||
),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user