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

Add GraphQL for tenancy

This commit is contained in:
jeremystretch
2021-06-25 14:19:20 -04:00
parent 7256c7050a
commit 881b18f6d0
5 changed files with 39 additions and 2 deletions

View File

@@ -0,0 +1,12 @@
import graphene
from netbox.graphql.fields import ObjectField, ObjectListField
from .types import *
class TenancyQuery(graphene.ObjectType):
tenant = ObjectField(TenantType)
tenants = ObjectListField(TenantType)
tenant_group = ObjectField(TenantGroupType)
tenant_groups = ObjectListField(TenantGroupType)