|
6 | 6 |
|
7 | 7 | from graphql_relay import connection_from_list
|
8 | 8 |
|
9 |
| -from ..types import AbstractType, Boolean, Int, List, String |
| 9 | +from ..types import (AbstractType, Boolean, Enum, Int, Interface, List, NonNull, Scalar, String, |
| 10 | + Union) |
10 | 11 | from ..types.field import Field
|
11 | 12 | from ..types.objecttype import ObjectType, ObjectTypeMeta
|
12 | 13 | from ..types.options import Options
|
13 | 14 | from ..utils.is_base_type import is_base_type
|
14 | 15 | from ..utils.props import props
|
15 |
| -from .node import Node, is_node |
| 16 | +from .node import is_node |
16 | 17 |
|
17 | 18 |
|
18 | 19 | class PageInfo(ObjectType):
|
@@ -57,7 +58,7 @@ def __new__(cls, name, bases, attrs):
|
57 | 58 | options.local_fields = OrderedDict()
|
58 | 59 |
|
59 | 60 | assert options.node, 'You have to provide a node in {}.Meta'.format(cls.__name__)
|
60 |
| - assert issubclass(options.node, (Node, ObjectType)), ( |
| 61 | + assert issubclass(options.node, (Scalar, Enum, ObjectType, Interface, Union, NonNull)), ( |
61 | 62 | 'Received incompatible node "{}" for Connection {}.'
|
62 | 63 | ).format(options.node, name)
|
63 | 64 |
|
|
0 commit comments