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

15553 change graphql sub-queries from functions to types (#15557)

* 15553 change graphql list to types

* 15553 review changes
This commit is contained in:
Arthur Hanson
2024-03-29 11:54:31 -07:00
committed by GitHub
parent c8d288671e
commit 8767577ecd
14 changed files with 226 additions and 799 deletions

View File

@@ -22,9 +22,7 @@ __all__ = (
class WirelessLANGroupType(OrganizationalObjectType):
parent: Annotated["WirelessLANGroupType", strawberry.lazy('wireless.graphql.types')] | None
@strawberry_django.field
def wireless_lans(self) -> List[Annotated["WirelessLANType", strawberry.lazy('wireless.graphql.types')]]:
return self.wireless_lans.all()
wireless_lans: List[Annotated["WirelessLANType", strawberry.lazy('wireless.graphql.types')]]
@strawberry_django.type(
@@ -37,9 +35,7 @@ class WirelessLANType(NetBoxObjectType):
vlan: Annotated["VLANType", strawberry.lazy('ipam.graphql.types')] | None
tenant: Annotated["TenantType", strawberry.lazy('tenancy.graphql.types')] | None
@strawberry_django.field
def interfaces(self) -> List[Annotated["InterfaceType", strawberry.lazy('dcim.graphql.types')]]:
return self.interfaces.all()
interfaces: List[Annotated["InterfaceType", strawberry.lazy('dcim.graphql.types')]]
@strawberry_django.type(