import graphene from django.conf import settings from graphene_django.debug import DjangoDebug from users.mutations_public import UserMutations class Mutation(UserMutations, graphene.ObjectType): if settings.DEBUG: debug = graphene.Field(DjangoDebug, name='__debug') schema = graphene.Schema(mutation=Mutation)