Skip to content

Commit fd6ceb3

Browse files
Merge branch 'support-point-field-in-args'
2 parents 43cf686 + c30a586 commit fd6ceb3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

graphene_mongo/fields.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,11 @@ def chained_resolver(self, resolver, is_partial, root, info, **args):
400400
if '.' in arg_name:
401401
operation = list(arg.keys())[0]
402402
args_copy[arg_name.replace('.', '__') + operation.replace('$', '__')] = arg[operation]
403+
else:
404+
if isinstance(arg, dict) and ('$lte' in arg or '$gte' in arg):
405+
operation = list(arg.keys())[0]
406+
args_copy[arg_name + operation.replace('$', '__')] = arg[operation]
407+
del args_copy[arg_name]
403408
return self.default_resolver(root, info, required_fields, **args_copy)
404409
else:
405410
return resolved

0 commit comments

Comments
 (0)