From 18872ed8d5471abac51c6baa9e7ef6c499cd87de Mon Sep 17 00:00:00 2001 From: Sultan Iman Date: Thu, 1 Nov 2018 22:29:29 +0100 Subject: [PATCH] fix: code blocks missing colon --- docs/custom-errors.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/custom-errors.rst b/docs/custom-errors.rst index f485d60..b86e2dc 100644 --- a/docs/custom-errors.rst +++ b/docs/custom-errors.rst @@ -3,7 +3,7 @@ Custom errors Default GraphQL error format similar to the following snippet -.. code: json +.. code:: json { "errors": [ @@ -22,7 +22,8 @@ Default GraphQL error format similar to the following snippet And there is a way customise it by swapping default ``GraphQLView`` with your own and then override ``format_error`` method -.. code: python +.. code:: python + class MyGraphQLView(GraphQLView): @staticmethod def format_error(error) -> Dict[str, Any]: @@ -34,7 +35,8 @@ and then override ``format_error`` method Here is custom formatting function -.. code: python +.. code:: python + def format_error(error: GraphQLError) -> Dict[str, Any]: """Extract field from ``error`` and return formatted error :param error: GraphQLError