schema.py 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. from typing import List
  2. import strawberry
  3. import strawberry_django
  4. from strawberry_django.pagination import OffsetPaginated
  5. from .types import *
  6. @strawberry.type(name="Query")
  7. class VirtualizationQueryV1:
  8. cluster: ClusterType = strawberry_django.field()
  9. cluster_list: List[ClusterType] = strawberry_django.field()
  10. cluster_group: ClusterGroupType = strawberry_django.field()
  11. cluster_group_list: List[ClusterGroupType] = strawberry_django.field()
  12. cluster_type: ClusterTypeType = strawberry_django.field()
  13. cluster_type_list: List[ClusterTypeType] = strawberry_django.field()
  14. virtual_machine: VirtualMachineType = strawberry_django.field()
  15. virtual_machine_list: List[VirtualMachineType] = strawberry_django.field()
  16. vm_interface: VMInterfaceType = strawberry_django.field()
  17. vm_interface_list: List[VMInterfaceType] = strawberry_django.field()
  18. virtual_disk: VirtualDiskType = strawberry_django.field()
  19. virtual_disk_list: List[VirtualDiskType] = strawberry_django.field()
  20. @strawberry.type(name="Query")
  21. class VirtualizationQuery:
  22. cluster: ClusterType = strawberry_django.field()
  23. cluster_list: OffsetPaginated[ClusterType] = strawberry_django.offset_paginated()
  24. cluster_group: ClusterGroupType = strawberry_django.field()
  25. cluster_group_list: OffsetPaginated[ClusterGroupType] = strawberry_django.offset_paginated()
  26. cluster_type: ClusterTypeType = strawberry_django.field()
  27. cluster_type_list: OffsetPaginated[ClusterTypeType] = strawberry_django.offset_paginated()
  28. virtual_machine: VirtualMachineType = strawberry_django.field()
  29. virtual_machine_list: OffsetPaginated[VirtualMachineType] = strawberry_django.offset_paginated()
  30. vm_interface: VMInterfaceType = strawberry_django.field()
  31. vm_interface_list: OffsetPaginated[VMInterfaceType] = strawberry_django.offset_paginated()
  32. virtual_disk: VirtualDiskType = strawberry_django.field()
  33. virtual_disk_list: OffsetPaginated[VirtualDiskType] = strawberry_django.offset_paginated()