Allow inheritance of the connection class

This commit is contained in:
Cameron Hurst 2019-02-27 17:13:07 -05:00
parent abff3d75a3
commit f4d5603ad3
No known key found for this signature in database
GPG Key ID: 21D8849D8BAFABCA

View File

@ -50,7 +50,8 @@ class Connection(ObjectType):
abstract = True
@classmethod
def __init_subclass_with_meta__(cls, node=None, name=None, **options):
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(