From f4d5603ad31589cfee689a24282107be7a6ea267 Mon Sep 17 00:00:00 2001 From: Cameron Hurst Date: Wed, 27 Feb 2019 17:13:07 -0500 Subject: [PATCH] Allow inheritance of the connection class --- graphene/relay/connection.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/graphene/relay/connection.py b/graphene/relay/connection.py index 047f2b4d..6d0cdb12 100644 --- a/graphene/relay/connection.py +++ b/graphene/relay/connection.py @@ -50,8 +50,9 @@ class Connection(ObjectType): abstract = True @classmethod - def __init_subclass_with_meta__(cls, node=None, name=None, **options): - _meta = ConnectionOptions(cls) + def __init_subclass_with_meta__(cls, node=None, name=None, _meta=None, **options): + if not _meta: + _meta = ConnectionOptions(cls) assert node, "You have to provide a node in {}.Meta".format(cls.__name__) assert isinstance(node, NonNull) or issubclass( node, (Scalar, Enum, ObjectType, Interface, Union, NonNull)