Skip to content

Commit 1406b8f

Browse files
committed
Add _meta explicitely
1 parent e028a7d commit 1406b8f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

graphene/types/union.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,14 @@ class Query(ObjectType):
5151
"""
5252

5353
@classmethod
54-
def __init_subclass_with_meta__(cls, types=None, **options):
54+
def __init_subclass_with_meta__(cls, types=None, _meta=None, **options):
5555
assert (
5656
isinstance(types, (list, tuple)) and len(types) > 0
5757
), f"Must provide types for Union {cls.__name__}."
5858

59-
_meta = options.pop("_meta", UnionOptions(cls))
59+
if _meta is None:
60+
_meta = UnionOptions(cls)
61+
6062
_meta.types = types
6163
super(Union, cls).__init_subclass_with_meta__(_meta=_meta, **options)
6264

0 commit comments

Comments
 (0)