diff --git a/graphene_django/types.py b/graphene_django/types.py index aa8b5a3..4441a9a 100644 --- a/graphene_django/types.py +++ b/graphene_django/types.py @@ -1,5 +1,7 @@ +import six from collections import OrderedDict +from django.db.models import Model from django.utils.functional import SimpleLazyObject from graphene import Field from graphene.relay import Connection, Node @@ -11,6 +13,10 @@ from .registry import Registry, get_global_registry from .utils import DJANGO_FILTER_INSTALLED, get_model_fields, is_valid_django_model +if six.PY3: + from typing import Type + + def construct_fields(model, registry, only_fields, exclude_fields): _model_fields = get_model_fields(model)