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

Add GraphQL for users and groups

This commit is contained in:
jeremystretch
2021-06-29 13:15:10 -04:00
parent ef3cb9544a
commit 05ba54b6d3
6 changed files with 56 additions and 2 deletions

View File

@@ -0,0 +1,12 @@
import graphene
from netbox.graphql.fields import ObjectField, ObjectListField
from .types import *
class UsersQuery(graphene.ObjectType):
group = ObjectField(GroupType)
groups = ObjectListField(GroupType)
user = ObjectField(UserType)
users = ObjectListField(UserType)