From f6684ca92d5c7ed87872ec2b768564fb4a033b9f Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Fri, 30 Sep 2016 09:14:06 -0700 Subject: [PATCH] Improved cookbook --- examples/cookbook/cookbook/schema.py | 2 -- examples/cookbook/cookbook/settings.py | 5 ++++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/cookbook/cookbook/schema.py b/examples/cookbook/cookbook/schema.py index d392f83..55fae16 100644 --- a/examples/cookbook/cookbook/schema.py +++ b/examples/cookbook/cookbook/schema.py @@ -3,8 +3,6 @@ import graphene 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): debug = graphene.Field(DjangoDebug, name='__debug') diff --git a/examples/cookbook/cookbook/settings.py b/examples/cookbook/cookbook/settings.py index 8449914..62afadb 100644 --- a/examples/cookbook/cookbook/settings.py +++ b/examples/cookbook/cookbook/settings.py @@ -55,7 +55,10 @@ MIDDLEWARE_CLASSES = [ ] GRAPHENE = { - 'SCHEMA': 'cookbook.schema.schema' + 'SCHEMA': 'cookbook.schema.schema', + 'MIDDLEWARE': ( + 'graphene_django.debug.DjangoDebugMiddleware', + ) } ROOT_URLCONF = 'cookbook.urls'