diff --git a/netbox/netbox/graphql/types.py b/netbox/netbox/graphql/types.py index 7ec152fac..5a4d16a8f 100644 --- a/netbox/netbox/graphql/types.py +++ b/netbox/netbox/graphql/types.py @@ -1,4 +1,5 @@ import graphene +from graphene.types.generic import GenericScalar from graphene_django import DjangoObjectType __all__ = ( @@ -22,11 +23,17 @@ class BaseObjectType(DjangoObjectType): class ObjectType(BaseObjectType): - # TODO: Custom fields support + """ + Extends BaseObjectType with support for custom field data. + """ + custom_fields = GenericScalar() class Meta: abstract = True + def resolve_custom_fields(self, info): + return self.custom_field_data + class TaggedObjectType(ObjectType): """