From 1e79165a7ee5e075ed18d318b5682d42e197e08e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9Clgen=20Sar=C4=B1kavak?= Date: Sun, 15 Mar 2020 19:43:55 +0300 Subject: [PATCH] Replace deprecated connection_from_list_slice with connection_from_array_slice connection_from_list_slice: > Deprecated alias for connection_from_array_slice. We're now using the JavaScript terminology in Python as well, since list is too narrow a type and there is no other really appropriate type name. https://github.com/graphql-python/graphql-relay-py/blob/v3.0.0/src/graphql_relay/connection/arrayconnection.py#L54 --- graphene_django/fields.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/graphene_django/fields.py b/graphene_django/fields.py index f0a3828..c8693fd 100644 --- a/graphene_django/fields.py +++ b/graphene_django/fields.py @@ -1,7 +1,8 @@ from functools import partial from django.db.models.query import QuerySet -from graphql_relay.connection.arrayconnection import connection_from_list_slice + +from graphql_relay.connection.arrayconnection import connection_from_array_slice from promise import Promise from graphene import NonNull @@ -122,15 +123,15 @@ class DjangoConnectionField(ConnectionField): _len = iterable.count() else: _len = len(iterable) - connection = connection_from_list_slice( + connection = connection_from_array_slice( iterable, args, slice_start=0, - list_length=_len, - list_slice_length=_len, connection_type=connection, + array_length=_len, + array_slice_length=_len, edge_type=connection.Edge, - pageinfo_type=PageInfo, + page_info_type=PageInfo, ) connection.iterable = iterable connection.length = _len