We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27ef570 commit f26d023Copy full SHA for f26d023
graphene_mongo/fields.py
@@ -82,9 +82,16 @@ def fields(self):
82
83
@classmethod
84
def get_query(cls, model, info, **args):
85
+ objs = model.objects()
86
if args:
- return model.objects().filter(**args)
87
- return model.objects()
+ objs = objs.filter(**args)
88
+
89
+ if 'first' in args:
90
+ objs = objs[:args['first']]
91
+ if 'last' in args:
92
+ objs = objs[:-args['last']]
93
94
+ return objs
95
96
97
def merge_querysets(cls, default_queryset, queryset):
0 commit comments