Revert back to ordereddict

This commit is contained in:
Christian Glacet 2021-05-20 15:06:24 +02:00
parent 1ad2ebeebf
commit 3726fa7574

View File

@ -1,5 +1,6 @@
import re
from collections.abc import Iterable
from collections import OrderedDict
from functools import partial
from graphql_relay import connection_from_list
@ -86,18 +87,26 @@ class Connection(ObjectType):
options["name"] = name
_meta.node = node
_meta.fields = {
"page_info": Field(
PageInfo,
name="pageInfo",
required=True,
description="Pagination data for this connection.",
),
"edges": Field(
NonNull(List(edge)),
description="Contains the nodes in this connection.",
),
}
_meta.fields = OrderedDict(
[
(
"page_info",
Field(
PageInfo,
name="pageInfo",
required=True,
description="Pagination data for this connection.",
),
),
(
"edges",
Field(
NonNull(List(edge)),
description="Contains the nodes in this connection.",
),
),
]
)
return super(Connection, cls).__init_subclass_with_meta__(
_meta=_meta, **options
)