mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Add GraphQL for extras
This commit is contained in:
30
netbox/extras/graphql/schema.py
Normal file
30
netbox/extras/graphql/schema.py
Normal file
@@ -0,0 +1,30 @@
|
||||
import graphene
|
||||
|
||||
from netbox.graphql.fields import ObjectField, ObjectListField
|
||||
from .types import *
|
||||
|
||||
|
||||
class ExtrasQuery(graphene.ObjectType):
|
||||
config_context = ObjectField(ConfigContextType)
|
||||
config_contexts = ObjectListField(ConfigContextType)
|
||||
|
||||
custom_field = ObjectField(CustomFieldType)
|
||||
custom_fields = ObjectListField(CustomFieldType)
|
||||
|
||||
custom_link = ObjectField(CustomLinkType)
|
||||
custom_links = ObjectListField(CustomLinkType)
|
||||
|
||||
export_template = ObjectField(ExportTemplateType)
|
||||
export_templates = ObjectListField(ExportTemplateType)
|
||||
|
||||
image_attachment = ObjectField(ImageAttachmentType)
|
||||
image_attachments = ObjectListField(ImageAttachmentType)
|
||||
|
||||
journal_entry = ObjectField(JournalEntryType)
|
||||
journal_entries = ObjectListField(JournalEntryType)
|
||||
|
||||
tag = ObjectField(TagType)
|
||||
tags = ObjectListField(TagType)
|
||||
|
||||
webhook = ObjectField(WebhookType)
|
||||
webhooks = ObjectListField(WebhookType)
|
||||
Reference in New Issue
Block a user