因为你没有
DjangoObjectType
为Django's
ContentType
模型。
你可以创造它,
from graphene_django import DjangoObjectType
from django.contrib.contenttypes.models import ContentType
class ContentObjectType(DjangoObjectType):
class Meta:
model = ContentType
按照
documentation
,必须为每个模型子类创建类型
djangoobjecttype