mirror of
https://github.com/graphql-python/graphene.git
synced 2025-07-16 19:12:21 +03:00
Revert back to ordereddict
This commit is contained in:
parent
1ad2ebeebf
commit
3726fa7574
|
@ -1,5 +1,6 @@
|
||||||
import re
|
import re
|
||||||
from collections.abc import Iterable
|
from collections.abc import Iterable
|
||||||
|
from collections import OrderedDict
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
from graphql_relay import connection_from_list
|
from graphql_relay import connection_from_list
|
||||||
|
@ -86,18 +87,26 @@ class Connection(ObjectType):
|
||||||
|
|
||||||
options["name"] = name
|
options["name"] = name
|
||||||
_meta.node = node
|
_meta.node = node
|
||||||
_meta.fields = {
|
_meta.fields = OrderedDict(
|
||||||
"page_info": Field(
|
[
|
||||||
PageInfo,
|
(
|
||||||
name="pageInfo",
|
"page_info",
|
||||||
required=True,
|
Field(
|
||||||
description="Pagination data for this connection.",
|
PageInfo,
|
||||||
),
|
name="pageInfo",
|
||||||
"edges": Field(
|
required=True,
|
||||||
NonNull(List(edge)),
|
description="Pagination data for this connection.",
|
||||||
description="Contains the nodes in this connection.",
|
),
|
||||||
),
|
),
|
||||||
}
|
(
|
||||||
|
"edges",
|
||||||
|
Field(
|
||||||
|
NonNull(List(edge)),
|
||||||
|
description="Contains the nodes in this connection.",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
)
|
||||||
return super(Connection, cls).__init_subclass_with_meta__(
|
return super(Connection, cls).__init_subclass_with_meta__(
|
||||||
_meta=_meta, **options
|
_meta=_meta, **options
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user