diff --git a/graphene_django/fields.py b/graphene_django/fields.py index 67559aa..634d8f7 100644 --- a/graphene_django/fields.py +++ b/graphene_django/fields.py @@ -150,7 +150,11 @@ class DjangoConnectionField(ConnectionField): after = min(get_offset_with_default(args.get("after"), -1) + 1, list_length) if max_limit is not None and "first" not in args: - args["first"] = max_limit + if "last" in args: + args["first"] = list_length + list_slice_length = list_length + else: + args["first"] = max_limit connection = connection_from_list_slice( iterable[after:],