19724 change from old to V1
Some checks failed
CI / build (20.x, 3.12) (push) Has been cancelled
CI / build (20.x, 3.13) (push) Has been cancelled

This commit is contained in:
Arthur
2025-10-22 08:57:36 -07:00
parent 26c91f01c6
commit 76caae12fa
11 changed files with 30 additions and 30 deletions

View File

@@ -8,7 +8,7 @@ from .types import *
@strawberry.type(name="Query")
class CircuitsQueryOld:
class CircuitsQueryV1:
circuit: CircuitType = strawberry_django.field()
circuit_list: List[CircuitType] = strawberry_django.field()

View File

@@ -8,7 +8,7 @@ from .types import *
@strawberry.type(name="Query")
class CoreQueryOld:
class CoreQueryV1:
data_file: DataFileType = strawberry_django.field()
data_file_list: List[DataFileType] = strawberry_django.field()

View File

@@ -8,7 +8,7 @@ from .types import *
@strawberry.type(name="Query")
class DCIMQueryOld:
class DCIMQueryV1:
cable: CableType = strawberry_django.field()
cable_list: List[CableType] = strawberry_django.field()

View File

@@ -8,7 +8,7 @@ from .types import *
@strawberry.type(name="Query")
class ExtrasQueryOld:
class ExtrasQueryV1:
config_context: ConfigContextType = strawberry_django.field()
config_context_list: List[ConfigContextType] = strawberry_django.field()

View File

@@ -8,7 +8,7 @@ from .types import *
@strawberry.type(name="Query")
class IPAMQueryOld:
class IPAMQueryV1:
asn: ASNType = strawberry_django.field()
asn_list: List[ASNType] = strawberry_django.field()

View File

@@ -4,17 +4,17 @@ from strawberry_django.optimizer import DjangoOptimizerExtension
from strawberry.extensions import MaxAliasesLimiter
from strawberry.schema.config import StrawberryConfig
from circuits.graphql.schema import CircuitsQuery, CircuitsQueryOld
from core.graphql.schema import CoreQuery, CoreQueryOld
from dcim.graphql.schema import DCIMQuery, DCIMQueryOld
from extras.graphql.schema import ExtrasQuery, ExtrasQueryOld
from ipam.graphql.schema import IPAMQuery, IPAMQueryOld
from circuits.graphql.schema import CircuitsQuery, CircuitsQueryV1
from core.graphql.schema import CoreQuery, CoreQueryV1
from dcim.graphql.schema import DCIMQuery, DCIMQueryV1
from extras.graphql.schema import ExtrasQuery, ExtrasQueryV1
from ipam.graphql.schema import IPAMQuery, IPAMQueryV1
from netbox.registry import registry
from tenancy.graphql.schema import TenancyQuery, TenancyQueryOld
from users.graphql.schema import UsersQuery, UsersQueryOld
from virtualization.graphql.schema import VirtualizationQuery, VirtualizationQueryOld
from vpn.graphql.schema import VPNQuery, VPNQueryOld
from wireless.graphql.schema import WirelessQuery, WirelessQueryOld
from tenancy.graphql.schema import TenancyQuery, TenancyQueryV1
from users.graphql.schema import UsersQuery, UsersQueryV1
from virtualization.graphql.schema import VirtualizationQuery, VirtualizationQueryV1
from vpn.graphql.schema import VPNQuery, VPNQueryV1
from wireless.graphql.schema import WirelessQuery, WirelessQueryV1
__all__ = (
'Query',
@@ -27,16 +27,16 @@ __all__ = (
@strawberry.type
class QueryV1(
UsersQueryOld,
CircuitsQueryOld,
CoreQueryOld,
DCIMQueryOld,
ExtrasQueryOld,
IPAMQueryOld,
TenancyQueryOld,
VirtualizationQueryOld,
VPNQueryOld,
WirelessQueryOld,
UsersQueryV1,
CircuitsQueryV1,
CoreQueryV1,
DCIMQueryV1,
ExtrasQueryV1,
IPAMQueryV1,
TenancyQueryV1,
VirtualizationQueryV1,
VPNQueryV1,
WirelessQueryV1,
*registry['plugins']['graphql_schemas'], # Append plugin schemas
):
"""Query class for GraphQL API v1"""

View File

@@ -8,7 +8,7 @@ from .types import *
@strawberry.type(name="Query")
class TenancyQueryOld:
class TenancyQueryV1:
tenant: TenantType = strawberry_django.field()
tenant_list: List[TenantType] = strawberry_django.field()

View File

@@ -8,7 +8,7 @@ from .types import *
@strawberry.type(name="Query")
class UsersQueryOld:
class UsersQueryV1:
group: GroupType = strawberry_django.field()
group_list: List[GroupType] = strawberry_django.field()

View File

@@ -8,7 +8,7 @@ from .types import *
@strawberry.type(name="Query")
class VirtualizationQueryOld:
class VirtualizationQueryV1:
cluster: ClusterType = strawberry_django.field()
cluster_list: List[ClusterType] = strawberry_django.field()

View File

@@ -8,7 +8,7 @@ from .types import *
@strawberry.type(name="Query")
class VPNQueryOld:
class VPNQueryV1:
ike_policy: IKEPolicyType = strawberry_django.field()
ike_policy_list: List[IKEPolicyType] = strawberry_django.field()

View File

@@ -8,7 +8,7 @@ from .types import *
@strawberry.type(name="Query")
class WirelessQueryOld:
class WirelessQueryV1:
wireless_lan: WirelessLANType = strawberry_django.field()
wireless_lan_list: List[WirelessLANType] = strawberry_django.field()