1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #6832: Support config context rendering under GraphQL API

This commit is contained in:
jeremystretch
2021-08-04 15:55:55 -04:00
parent 582b69de74
commit 57dc4c207f
4 changed files with 16 additions and 4 deletions

View File

@@ -3,6 +3,7 @@ from graphene.types.generic import GenericScalar
__all__ = (
'ChangelogMixin',
'ConfigContextMixin',
'CustomFieldsMixin',
'ImageAttachmentsMixin',
'JournalEntriesMixin',
@@ -17,6 +18,13 @@ class ChangelogMixin:
return self.object_changes.restrict(info.context.user, 'view')
class ConfigContextMixin:
config_context = GenericScalar()
def resolve_config_context(self, info):
return self.get_config_context()
class CustomFieldsMixin:
custom_fields = GenericScalar()