Integrate Owner and JournalEntries fields

This commit is contained in:
Brian Tiemann 2025-10-24 21:18:51 -04:00
parent 3e1ccc80e9
commit ebeceaaa21
2 changed files with 36 additions and 2 deletions

View File

@ -52,4 +52,5 @@ LOGGING = {
'disable_existing_loggers': True
}
GRAPHQL_DEFAULT_VERSION = 2
# TODO: Switch to 2
GRAPHQL_DEFAULT_VERSION = 1

View File

@ -6,13 +6,16 @@ from django.contrib.contenttypes.models import ContentType
from core.graphql.mixins import ChangelogMixin
from core.models import ObjectType as ObjectType_
from extras.graphql.mixins import CustomFieldsMixin, JournalEntriesMixin, TagsMixin
from users.graphql.mixins import OwnerMixin
__all__ = (
'BaseObjectTypeV1',
'ContentTypeTypeV1',
'NestedGroupObjectTypeV1',
'NetBoxObjectTypeV1',
'ObjectTypeV1',
'OrganizationalObjectTypeV1',
'NetBoxObjectTypeV1',
'PrimaryObjectTypeV1',
)
@ -53,10 +56,26 @@ class ObjectTypeV1(
pass
class PrimaryObjectTypeV1(
ChangelogMixin,
CustomFieldsMixin,
JournalEntriesMixin,
TagsMixin,
OwnerMixin,
BaseObjectTypeV1
):
"""
Base GraphQL type for models which inherit from PrimaryModel.
"""
pass
class OrganizationalObjectTypeV1(
ChangelogMixin,
CustomFieldsMixin,
JournalEntriesMixin,
TagsMixin,
OwnerMixin,
BaseObjectTypeV1
):
"""
@ -65,6 +84,20 @@ class OrganizationalObjectTypeV1(
pass
class NestedGroupObjectTypeV1(
ChangelogMixin,
CustomFieldsMixin,
JournalEntriesMixin,
TagsMixin,
OwnerMixin,
BaseObjectTypeV1
):
"""
Base GraphQL type for models which inherit from NestedGroupModel.
"""
pass
class NetBoxObjectTypeV1(
ChangelogMixin,
CustomFieldsMixin,