Skip to content

Commit 2e26806

Browse files
croecknodkz
authored andcommitted
fix(findByIds): do not call mongoose for empty _ids array
Closes #74
1 parent 4a854d2 commit 2e26806

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/resolvers/findByIds.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default function findByIds(
4646
resolve: (resolveParams: ExtendedResolveParams) => {
4747
const args = resolveParams.args || {};
4848

49-
if (!Array.isArray(args._ids)) {
49+
if (!Array.isArray(args._ids) || args._ids.length === 0) {
5050
return Promise.resolve([]);
5151
}
5252

0 commit comments

Comments
 (0)