Skip to content

Commit

Permalink
Added relay PageInfo, Connection super constructors. Fixed #131
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary committed Mar 30, 2016
1 parent bf60aca commit 21ec116
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions graphene/relay/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 21ec116

Please sign in to comment.