Skip to content

Commit 2af1926

Browse files
committed
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
1 parent 26e704a commit 2af1926

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

graphene_django/fields.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
from functools import partial
22

33
from django.db.models.query import QuerySet
4-
from graphql_relay.connection.arrayconnection import connection_from_list_slice
4+
5+
from graphql_relay.connection.arrayconnection import connection_from_array_slice
56
from promise import Promise
67

78
from graphene import NonNull
@@ -122,15 +123,15 @@ def resolve_connection(cls, connection, args, iterable):
122123
_len = iterable.count()
123124
else:
124125
_len = len(iterable)
125-
connection = connection_from_list_slice(
126+
connection = connection_from_array_slice(
126127
iterable,
127128
args,
128129
slice_start=0,
129-
list_length=_len,
130-
list_slice_length=_len,
131130
connection_type=connection,
131+
array_length=_len,
132+
array_slice_length=_len,
132133
edge_type=connection.Edge,
133-
pageinfo_type=PageInfo,
134+
page_info_type=PageInfo,
134135
)
135136
connection.iterable = iterable
136137
connection.length = _len

0 commit comments

Comments
 (0)