Skip to content

Commit 21ec116

Browse files
committed
Added relay PageInfo, Connection super constructors. Fixed #131
1 parent bf60aca commit 21ec116

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

graphene/relay/types.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
class PageInfo(ObjectType):
2121

2222
def __init__(self, start_cursor="", end_cursor="",
23-
has_previous_page=False, has_next_page=False):
23+
has_previous_page=False, has_next_page=False, **kwargs):
24+
super(PageInfo, self).__init__(**kwargs)
2425
self.startCursor = start_cursor
2526
self.endCursor = end_cursor
2627
self.hasPreviousPage = has_previous_page
@@ -58,7 +59,8 @@ def for_node(cls, node):
5859
class Connection(ObjectType):
5960
'''A connection to a list of items.'''
6061

61-
def __init__(self, edges, page_info):
62+
def __init__(self, edges, page_info, **kwargs):
63+
super(Connection, self).__init__(**kwargs)
6264
self.edges = edges
6365
self.pageInfo = page_info
6466

0 commit comments

Comments
 (0)