skillbox/server/api/schema.py

25 lines
639 B
Python

import graphene
from django.conf import settings
from graphene_django.debug import DjangoDebug
from book.schema import BookQuery
from objectives.schema import ObjectivesQuery
from rooms.schema import RoomsQuery
class Query(RoomsQuery, ObjectivesQuery, BookQuery, graphene.ObjectType):
# This class will inherit from multiple Queries
if settings.DEBUG:
debug = graphene.Field(DjangoDebug, name='__debug')
class Mutation(graphene.ObjectType):
# This class will inherit from multiple Queries
if settings.DEBUG:
debug = graphene.Field(DjangoDebug, name='__debug')
schema = graphene.Schema(query=Query)