1
0
Fork 0
Netbox-DNAC-Integration/dnac_integration/graphql.py

15 lines
436 B
Python
Raw Permalink Normal View History

2024-02-15 17:48:23 +00:00
from graphene import ObjectType
from netbox.graphql.types import NetBoxObjectType
from netbox.graphql.fields import ObjectField, ObjectListField
from . import filtersets, models
class dnacServerType(NetBoxObjectType):
class Meta:
model = models.dnacServer
fields = '__all__'
class Query(ObjectType):
dnacServer = ObjectField(dnacServerType)
dnacServer_list = ObjectListField(dnacServerType)
schema = Query