mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-04-16 07:02:04 +03:00
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
This commit is contained in:
parent
9c56e4d572
commit
1e79165a7e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user