fix: code blocks missing colon

This commit is contained in:
Sultan Iman 2018-11-01 22:29:29 +01:00
parent 08a42961da
commit 18872ed8d5

View File

@ -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