mirror of
https://github.com/netbox-community/netbox.git
synced 2026-04-06 00:32:08 +02:00
19724 change from old to V1
This commit is contained in:
@@ -8,7 +8,7 @@ from .types import *
|
|||||||
|
|
||||||
|
|
||||||
@strawberry.type(name="Query")
|
@strawberry.type(name="Query")
|
||||||
class CircuitsQueryOld:
|
class CircuitsQueryV1:
|
||||||
circuit: CircuitType = strawberry_django.field()
|
circuit: CircuitType = strawberry_django.field()
|
||||||
circuit_list: List[CircuitType] = strawberry_django.field()
|
circuit_list: List[CircuitType] = strawberry_django.field()
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ from .types import *
|
|||||||
|
|
||||||
|
|
||||||
@strawberry.type(name="Query")
|
@strawberry.type(name="Query")
|
||||||
class CoreQueryOld:
|
class CoreQueryV1:
|
||||||
data_file: DataFileType = strawberry_django.field()
|
data_file: DataFileType = strawberry_django.field()
|
||||||
data_file_list: List[DataFileType] = strawberry_django.field()
|
data_file_list: List[DataFileType] = strawberry_django.field()
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ from .types import *
|
|||||||
|
|
||||||
|
|
||||||
@strawberry.type(name="Query")
|
@strawberry.type(name="Query")
|
||||||
class DCIMQueryOld:
|
class DCIMQueryV1:
|
||||||
cable: CableType = strawberry_django.field()
|
cable: CableType = strawberry_django.field()
|
||||||
cable_list: List[CableType] = strawberry_django.field()
|
cable_list: List[CableType] = strawberry_django.field()
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ from .types import *
|
|||||||
|
|
||||||
|
|
||||||
@strawberry.type(name="Query")
|
@strawberry.type(name="Query")
|
||||||
class ExtrasQueryOld:
|
class ExtrasQueryV1:
|
||||||
config_context: ConfigContextType = strawberry_django.field()
|
config_context: ConfigContextType = strawberry_django.field()
|
||||||
config_context_list: List[ConfigContextType] = strawberry_django.field()
|
config_context_list: List[ConfigContextType] = strawberry_django.field()
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ from .types import *
|
|||||||
|
|
||||||
|
|
||||||
@strawberry.type(name="Query")
|
@strawberry.type(name="Query")
|
||||||
class IPAMQueryOld:
|
class IPAMQueryV1:
|
||||||
asn: ASNType = strawberry_django.field()
|
asn: ASNType = strawberry_django.field()
|
||||||
asn_list: List[ASNType] = strawberry_django.field()
|
asn_list: List[ASNType] = strawberry_django.field()
|
||||||
|
|
||||||
|
|||||||
@@ -4,17 +4,17 @@ from strawberry_django.optimizer import DjangoOptimizerExtension
|
|||||||
from strawberry.extensions import MaxAliasesLimiter
|
from strawberry.extensions import MaxAliasesLimiter
|
||||||
from strawberry.schema.config import StrawberryConfig
|
from strawberry.schema.config import StrawberryConfig
|
||||||
|
|
||||||
from circuits.graphql.schema import CircuitsQuery, CircuitsQueryOld
|
from circuits.graphql.schema import CircuitsQuery, CircuitsQueryV1
|
||||||
from core.graphql.schema import CoreQuery, CoreQueryOld
|
from core.graphql.schema import CoreQuery, CoreQueryV1
|
||||||
from dcim.graphql.schema import DCIMQuery, DCIMQueryOld
|
from dcim.graphql.schema import DCIMQuery, DCIMQueryV1
|
||||||
from extras.graphql.schema import ExtrasQuery, ExtrasQueryOld
|
from extras.graphql.schema import ExtrasQuery, ExtrasQueryV1
|
||||||
from ipam.graphql.schema import IPAMQuery, IPAMQueryOld
|
from ipam.graphql.schema import IPAMQuery, IPAMQueryV1
|
||||||
from netbox.registry import registry
|
from netbox.registry import registry
|
||||||
from tenancy.graphql.schema import TenancyQuery, TenancyQueryOld
|
from tenancy.graphql.schema import TenancyQuery, TenancyQueryV1
|
||||||
from users.graphql.schema import UsersQuery, UsersQueryOld
|
from users.graphql.schema import UsersQuery, UsersQueryV1
|
||||||
from virtualization.graphql.schema import VirtualizationQuery, VirtualizationQueryOld
|
from virtualization.graphql.schema import VirtualizationQuery, VirtualizationQueryV1
|
||||||
from vpn.graphql.schema import VPNQuery, VPNQueryOld
|
from vpn.graphql.schema import VPNQuery, VPNQueryV1
|
||||||
from wireless.graphql.schema import WirelessQuery, WirelessQueryOld
|
from wireless.graphql.schema import WirelessQuery, WirelessQueryV1
|
||||||
|
|
||||||
__all__ = (
|
__all__ = (
|
||||||
'Query',
|
'Query',
|
||||||
@@ -27,16 +27,16 @@ __all__ = (
|
|||||||
|
|
||||||
@strawberry.type
|
@strawberry.type
|
||||||
class QueryV1(
|
class QueryV1(
|
||||||
UsersQueryOld,
|
UsersQueryV1,
|
||||||
CircuitsQueryOld,
|
CircuitsQueryV1,
|
||||||
CoreQueryOld,
|
CoreQueryV1,
|
||||||
DCIMQueryOld,
|
DCIMQueryV1,
|
||||||
ExtrasQueryOld,
|
ExtrasQueryV1,
|
||||||
IPAMQueryOld,
|
IPAMQueryV1,
|
||||||
TenancyQueryOld,
|
TenancyQueryV1,
|
||||||
VirtualizationQueryOld,
|
VirtualizationQueryV1,
|
||||||
VPNQueryOld,
|
VPNQueryV1,
|
||||||
WirelessQueryOld,
|
WirelessQueryV1,
|
||||||
*registry['plugins']['graphql_schemas'], # Append plugin schemas
|
*registry['plugins']['graphql_schemas'], # Append plugin schemas
|
||||||
):
|
):
|
||||||
"""Query class for GraphQL API v1"""
|
"""Query class for GraphQL API v1"""
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ from .types import *
|
|||||||
|
|
||||||
|
|
||||||
@strawberry.type(name="Query")
|
@strawberry.type(name="Query")
|
||||||
class TenancyQueryOld:
|
class TenancyQueryV1:
|
||||||
tenant: TenantType = strawberry_django.field()
|
tenant: TenantType = strawberry_django.field()
|
||||||
tenant_list: List[TenantType] = strawberry_django.field()
|
tenant_list: List[TenantType] = strawberry_django.field()
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ from .types import *
|
|||||||
|
|
||||||
|
|
||||||
@strawberry.type(name="Query")
|
@strawberry.type(name="Query")
|
||||||
class UsersQueryOld:
|
class UsersQueryV1:
|
||||||
group: GroupType = strawberry_django.field()
|
group: GroupType = strawberry_django.field()
|
||||||
group_list: List[GroupType] = strawberry_django.field()
|
group_list: List[GroupType] = strawberry_django.field()
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ from .types import *
|
|||||||
|
|
||||||
|
|
||||||
@strawberry.type(name="Query")
|
@strawberry.type(name="Query")
|
||||||
class VirtualizationQueryOld:
|
class VirtualizationQueryV1:
|
||||||
cluster: ClusterType = strawberry_django.field()
|
cluster: ClusterType = strawberry_django.field()
|
||||||
cluster_list: List[ClusterType] = strawberry_django.field()
|
cluster_list: List[ClusterType] = strawberry_django.field()
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ from .types import *
|
|||||||
|
|
||||||
|
|
||||||
@strawberry.type(name="Query")
|
@strawberry.type(name="Query")
|
||||||
class VPNQueryOld:
|
class VPNQueryV1:
|
||||||
ike_policy: IKEPolicyType = strawberry_django.field()
|
ike_policy: IKEPolicyType = strawberry_django.field()
|
||||||
ike_policy_list: List[IKEPolicyType] = strawberry_django.field()
|
ike_policy_list: List[IKEPolicyType] = strawberry_django.field()
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ from .types import *
|
|||||||
|
|
||||||
|
|
||||||
@strawberry.type(name="Query")
|
@strawberry.type(name="Query")
|
||||||
class WirelessQueryOld:
|
class WirelessQueryV1:
|
||||||
wireless_lan: WirelessLANType = strawberry_django.field()
|
wireless_lan: WirelessLANType = strawberry_django.field()
|
||||||
wireless_lan_list: List[WirelessLANType] = strawberry_django.field()
|
wireless_lan_list: List[WirelessLANType] = strawberry_django.field()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user