diff --git a/docs/release-notes/version-3.0.md b/docs/release-notes/version-3.0.md index dd2819cb6..3419a325c 100644 --- a/docs/release-notes/version-3.0.md +++ b/docs/release-notes/version-3.0.md @@ -11,6 +11,7 @@ * [#6811](https://github.com/netbox-community/netbox/issues/6811) - Fix exception when editing users * [#6827](https://github.com/netbox-community/netbox/issues/6827) - Fix circuit termination connection dropdown * [#6846](https://github.com/netbox-community/netbox/issues/6846) - Form-driven REST API calls should use brief mode +* [#6871](https://github.com/netbox-community/netbox/issues/6871) - Support dynamic tag types in GraphQL API --- diff --git a/netbox/extras/graphql/mixins.py b/netbox/extras/graphql/mixins.py index 0afa6732e..fb5dd027d 100644 --- a/netbox/extras/graphql/mixins.py +++ b/netbox/extras/graphql/mixins.py @@ -39,7 +39,7 @@ class JournalEntriesMixin: class TagsMixin: - tags = graphene.List(graphene.String) + tags = graphene.List('extras.graphql.types.TagType') def resolve_tags(self, info): return self.tags.all() diff --git a/netbox/utilities/testing/api.py b/netbox/utilities/testing/api.py index fe652843a..c67296c47 100644 --- a/netbox/utilities/testing/api.py +++ b/netbox/utilities/testing/api.py @@ -449,7 +449,7 @@ class APIViewTestCases: if type(field) is GQLDynamic: # Dynamic fields must specify a subselection fields_string += f'{field_name} {{ id }}\n' - elif type(field.type) is GQLList and field_name not in ('tags', 'choices'): + elif type(field.type) is GQLList and field_name != 'choices': # TODO: Come up with something more elegant # Temporary hack to support automated testing of reverse generic relations fields_string += f'{field_name} {{ id }}\n'