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

9856 single item query for schema

This commit is contained in:
Arthur
2024-03-06 09:53:46 -08:00
parent 7c289aebc7
commit 2f719269e8
10 changed files with 309 additions and 103 deletions

View File

@@ -9,8 +9,12 @@ from .types import *
@strawberry.type
class UsersQuery:
group: GroupType = strawberry_django.field()
@strawberry.field
def group(self, id: int) -> GroupType:
return models.Group.objects.get(id=id)
group_list: List[GroupType] = strawberry_django.field()
user: UserType = strawberry_django.field()
@strawberry.field
def user(self, id: int) -> UserType:
return models.User.objects.get(id=id)
user_list: List[UserType] = strawberry_django.field()