mirror of
https://github.com/evgen-app/evg-app-back.git
synced 2024-11-22 08:46:34 +03:00
36 lines
1.0 KiB
Python
36 lines
1.0 KiB
Python
import graphene
|
|
|
|
from graphene_django import DjangoObjectType
|
|
|
|
from .graphqlTypes import DisposableEventType, UserType, TimeEventType, StaffEventType
|
|
from graphene_django.filter import DjangoFilterConnectionField
|
|
|
|
from .mutations import *
|
|
|
|
import graphql_jwt
|
|
|
|
class Query(graphene.ObjectType):
|
|
DisposableEvents = DjangoFilterConnectionField(DisposableEventType)
|
|
DisposableEvent = graphene.relay.Node.Field(DisposableEventType)
|
|
|
|
|
|
TimeEvents = DjangoFilterConnectionField(TimeEventType)
|
|
TimeEvent = graphene.relay.Node.Field(TimeEventType)
|
|
|
|
|
|
StaffEvents = DjangoFilterConnectionField(StaffEventType)
|
|
StaffEvent = graphene.relay.Node.Field(StaffEventType)
|
|
|
|
|
|
Users = DjangoFilterConnectionField(UserType)
|
|
User = graphene.relay.Node.Field(UserType)
|
|
|
|
|
|
class Mutation(graphene.ObjectType):
|
|
createTimeEvent = CreateTimeEvent.Field()
|
|
deleteTimeEvent = DeleteTimeEvent.Field()
|
|
changeTimeEventStatus = ChangeTimeEventStatus.Field()
|
|
|
|
token_auth = graphql_jwt.ObtainJSONWebToken.Field()
|
|
registration = RegUser.Field()
|