From 21ec1163b9aca3518068e3d65f370e4e3c454772 Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Tue, 29 Mar 2016 23:26:33 -0700 Subject: [PATCH] Added relay PageInfo, Connection super constructors. Fixed #131 --- graphene/relay/types.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/graphene/relay/types.py b/graphene/relay/types.py index bd2900219..d539bce74 100644 --- a/graphene/relay/types.py +++ b/graphene/relay/types.py @@ -20,7 +20,8 @@ class PageInfo(ObjectType): def __init__(self, start_cursor="", end_cursor="", - has_previous_page=False, has_next_page=False): + has_previous_page=False, has_next_page=False, **kwargs): + super(PageInfo, self).__init__(**kwargs) self.startCursor = start_cursor self.endCursor = end_cursor self.hasPreviousPage = has_previous_page @@ -58,7 +59,8 @@ def for_node(cls, node): class Connection(ObjectType): '''A connection to a list of items.''' - def __init__(self, edges, page_info): + def __init__(self, edges, page_info, **kwargs): + super(Connection, self).__init__(**kwargs) self.edges = edges self.pageInfo = page_info