skillbox/server/api/schema.py

24 lines
591 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
class Query(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)