Skip to content

Commit

Permalink
#10556 add display to GraphQL
Browse files Browse the repository at this point in the history
  • Loading branch information
arthanson committed Oct 4, 2022
1 parent 568e0c7 commit 81d99a0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions netbox/netbox/graphql/types.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import graphene

from django.contrib.contenttypes.models import ContentType
from graphene_django import DjangoObjectType

Expand All @@ -19,6 +21,11 @@ class BaseObjectType(DjangoObjectType):
"""
Base GraphQL object type for all NetBox objects. Restricts the model queryset to enforce object permissions.
"""
display = graphene.String()

def resolve_display(parent, info, **kwargs):
return str(parent)

class Meta:
abstract = True

Expand Down

0 comments on commit 81d99a0

Please sign in to comment.