Arthur 1 год назад
Родитель
Сommit
908150f9a1
1 измененных файлов с 9 добавлено и 0 удалено
  1. 9 0
      netbox/netbox/graphql/types.py

+ 9 - 0
netbox/netbox/graphql/types.py

@@ -4,6 +4,7 @@ import strawberry
 from strawberry import auto
 from strawberry import auto
 import strawberry_django
 import strawberry_django
 
 
+from core.models import ObjectType as ObjectType_
 from django.contrib.contenttypes.models import ContentType
 from django.contrib.contenttypes.models import ContentType
 from extras.graphql.mixins import (
 from extras.graphql.mixins import (
     ChangelogMixin,
     ChangelogMixin,
@@ -92,3 +93,11 @@ class NetBoxObjectType(
 )
 )
 class ContentTypeType:
 class ContentTypeType:
     pass
     pass
+
+
+@strawberry_django.type(
+    ObjectType_,
+    fields=['id', 'app_label', 'model'],
+)
+class ObjectTypeType:
+    pass