timetracker/games/graphql/queries/device.py

12 lines
264 B
Python
Raw Normal View History

2023-11-29 20:58:33 +00:00
import graphene
from games.graphql.types import Device
from games.models import Device as DeviceModel
class Query(graphene.ObjectType):
devices = graphene.List(Device)
def resolve_devices(self, info, **kwargs):
return DeviceModel.objects.all()