mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-16 04:02:52 -06:00

* Fixes: #16292 - Properly restrict GraphQL queries for querys with pk set * Update netbox/netbox/settings.py * Apply schema adaptations across all apps * Extend GraphQL API tests --------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
28 lines
963 B
Python
28 lines
963 B
Python
from typing import List
|
|
|
|
import strawberry
|
|
import strawberry_django
|
|
|
|
from .types import *
|
|
|
|
|
|
@strawberry.type(name="Query")
|
|
class VirtualizationQuery:
|
|
cluster: ClusterType = strawberry_django.field()
|
|
cluster_list: List[ClusterType] = strawberry_django.field()
|
|
|
|
cluster_group: ClusterGroupType = strawberry_django.field()
|
|
cluster_group_list: List[ClusterGroupType] = strawberry_django.field()
|
|
|
|
cluster_type: ClusterTypeType = strawberry_django.field()
|
|
cluster_type_list: List[ClusterTypeType] = strawberry_django.field()
|
|
|
|
virtual_machine: VirtualMachineType = strawberry_django.field()
|
|
virtual_machine_list: List[VirtualMachineType] = strawberry_django.field()
|
|
|
|
vm_interface: VMInterfaceType = strawberry_django.field()
|
|
vm_interface_list: List[VMInterfaceType] = strawberry_django.field()
|
|
|
|
virtual_disk: VirtualDiskType = strawberry_django.field()
|
|
virtual_disk_list: List[VirtualDiskType] = strawberry_django.field()
|