From b71a2cb69e50c8f3bbc4d40d3ccda003b8088a3c Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Thu, 20 Apr 2017 00:34:05 -0700 Subject: [PATCH] Fixed middleware docs to use whitespaces instead of tabs --- docs/execution/middleware.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/execution/middleware.rst b/docs/execution/middleware.rst index 54eb55db..3303ed41 100644 --- a/docs/execution/middleware.rst +++ b/docs/execution/middleware.rst @@ -30,15 +30,15 @@ This middleware only continues evaluation if the ``field_name`` is not ``'user'` .. code:: python - class AuthorizationMiddleware(object): - def resolve(self, next, root, args, context, info): - if info.field_name == 'user': - return None - return next(root, args, context, info) + class AuthorizationMiddleware(object): + def resolve(self, next, root, args, context, info): + if info.field_name == 'user': + return None + return next(root, args, context, info) And then execute it with: .. code:: python - result = schema.execute('THE QUERY', middleware=[AuthorizationMiddleware()]) + result = schema.execute('THE QUERY', middleware=[AuthorizationMiddleware()])