Improved cookbook

This commit is contained in:
Syrus Akbary 2016-09-30 09:14:06 -07:00
parent 787ba73255
commit f6684ca92d
2 changed files with 4 additions and 3 deletions

View File

@ -3,8 +3,6 @@ import graphene
from graphene_django.debug import DjangoDebug from graphene_django.debug import DjangoDebug
# print cookbook.ingredients.schema.Query._meta.graphql_type.get_fields()['allIngredients'].args
class Query(cookbook.ingredients.schema.Query, graphene.ObjectType): class Query(cookbook.ingredients.schema.Query, graphene.ObjectType):
debug = graphene.Field(DjangoDebug, name='__debug') debug = graphene.Field(DjangoDebug, name='__debug')

View File

@ -55,7 +55,10 @@ MIDDLEWARE_CLASSES = [
] ]
GRAPHENE = { GRAPHENE = {
'SCHEMA': 'cookbook.schema.schema' 'SCHEMA': 'cookbook.schema.schema',
'MIDDLEWARE': (
'graphene_django.debug.DjangoDebugMiddleware',
)
} }
ROOT_URLCONF = 'cookbook.urls' ROOT_URLCONF = 'cookbook.urls'