mirror of
https://github.com/graphql-python/graphene-django.git
synced 2024-11-22 09:37:07 +03:00
Add UnionOptions to DjangoUnionTypeOptions inheritance list
this change makes things more consistent and prevent possible issues with 3rd party libraries
This commit is contained in:
parent
de3f1ce25c
commit
0328b86e2a
|
@ -7,7 +7,7 @@ from django.db.models import Model # noqa: F401
|
||||||
import graphene
|
import graphene
|
||||||
from graphene.relay import Connection, Node
|
from graphene.relay import Connection, Node
|
||||||
from graphene.types.objecttype import ObjectType, ObjectTypeOptions
|
from graphene.types.objecttype import ObjectType, ObjectTypeOptions
|
||||||
from graphene.types.union import Union
|
from graphene.types.union import Union, UnionOptions
|
||||||
from graphene.types.utils import yank_fields_from_attrs
|
from graphene.types.utils import yank_fields_from_attrs
|
||||||
|
|
||||||
from .converter import convert_django_field_with_choices
|
from .converter import convert_django_field_with_choices
|
||||||
|
@ -294,7 +294,7 @@ class DjangoObjectType(ObjectType):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
class DjangoUnionTypeOptions(ObjectTypeOptions):
|
class DjangoUnionTypeOptions(UnionOptions, ObjectTypeOptions):
|
||||||
model = None # type: Type[Model]
|
model = None # type: Type[Model]
|
||||||
registry = None # type: Registry
|
registry = None # type: Registry
|
||||||
connection = None # type: Type[Connection]
|
connection = None # type: Type[Connection]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user