From 2a3d92682a76080b4e80d9adea6f9fafbc1962cd Mon Sep 17 00:00:00 2001 From: Dan Palmer Date: Sun, 9 Sep 2018 18:44:01 +0100 Subject: [PATCH] Add descriptions to the fields as well --- graphene/relay/connection.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/graphene/relay/connection.py b/graphene/relay/connection.py index a0f5a14c..927dfcc4 100644 --- a/graphene/relay/connection.py +++ b/graphene/relay/connection.py @@ -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__(