9856 fixes to circuits type specifiers

This commit is contained in:
Arthur 2024-02-13 08:32:21 -08:00
parent eca0966d92
commit 99b01981d4

View File

@ -5,6 +5,7 @@ from circuits import models
from dcim.graphql.mixins import CabledObjectMixin
from extras.graphql.mixins import CustomFieldsMixin, TagsMixin, ContactsMixin
from netbox.graphql.types import ObjectType, OrganizationalObjectType, NetBoxObjectType
from tenancy.graphql.types import TenantType
from .filters import *
__all__ = (
@ -53,15 +54,6 @@ class CircuitTerminationType(CustomFieldsMixin, TagsMixin, CabledObjectMixin, Ob
pass
@strawberry_django.type(
models.Circuit,
fields='__all__',
filters=CircuitFilter
)
class CircuitType(NetBoxObjectType, ContactsMixin):
provider: ProviderType
@strawberry_django.type(
models.CircuitType,
# fields='__all__',
@ -70,3 +62,17 @@ class CircuitType(NetBoxObjectType, ContactsMixin):
)
class CircuitTypeType(OrganizationalObjectType):
pass
@strawberry_django.type(
models.Circuit,
fields='__all__',
filters=CircuitFilter
)
class CircuitType(NetBoxObjectType, ContactsMixin):
provider: ProviderType
provider_account: ProviderAccountType | None
termination_a: CircuitTerminationType | None
termination_z: CircuitTerminationType | None
type: CircuitTypeType
tenant: TenantType | None