timetracker/games/graphql/queries/purchase.py

12 lines
278 B
Python
Raw Normal View History

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