Skip to content

Commit 0e7df23

Browse files
israelglarnodkz
authored andcommitted
fix: make field '_id' optional in filter argument
In some cases, some resolver were making the filter._id argument required. This is a minor change that doesn't break any code. since that all the arguments in Filter are optional unless makeRequired is defined in options
1 parent 0b2df42 commit 0e7df23

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/resolvers/helpers/filter.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ export const filterHelperArgs = (
6969
const filterTypeName: string = opts.filterTypeName;
7070
const itc = typeComposer.getInputTypeComposer().clone(filterTypeName);
7171

72+
itc.makeOptional('_id');
73+
7274
itc.addFields({
7375
_ids: [GraphQLMongoID],
7476
});

0 commit comments

Comments
 (0)