import graphene from django.conf import settings from graphene_django.debug import DjangoDebug from users.mutations_public import UserMutations from registration.mutations_public import RegistrationMutations class Mutation(UserMutations, RegistrationMutations, graphene.ObjectType): if settings.DEBUG: debug = graphene.Field(DjangoDebug, name='__debug') # graphene neets some kind of schema in order to create a schema class DummyQuery(object): meaning_of_life = graphene.Int() def resolve_meaning_of_life(self, info, **kwargs): return 42 class Query(DummyQuery, graphene.ObjectType): pass schema = graphene.Schema(mutation=Mutation, query=Query)