Add descriptions to the fields as well

This commit is contained in:
Dan Palmer 2018-09-09 18:44:01 +01:00 committed by GitHub
parent b8ecc3929d
commit 2a3d92682a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -88,8 +88,22 @@ class Connection(ObjectType):
_meta.node = node
_meta.fields = OrderedDict(
[
("page_info", Field(PageInfo, name="pageInfo", required=True)),
("edges", Field(NonNull(List(edge)))),
(
"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__(