mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-11 00:32:24 +03:00
Merge 3379a6d7b9
into f6ec0689c1
This commit is contained in:
commit
52f553ba2b
|
@ -11,7 +11,6 @@ from django.views.decorators.csrf import ensure_csrf_cookie
|
||||||
from django.views.generic import View
|
from django.views.generic import View
|
||||||
from graphql import OperationType, get_operation_ast, parse, validate
|
from graphql import OperationType, get_operation_ast, parse, validate
|
||||||
from graphql.error import GraphQLError
|
from graphql.error import GraphQLError
|
||||||
from graphql.error import format_error as format_graphql_error
|
|
||||||
from graphql.execution import ExecutionResult
|
from graphql.execution import ExecutionResult
|
||||||
|
|
||||||
from graphene import Schema
|
from graphene import Schema
|
||||||
|
@ -387,7 +386,7 @@ class GraphQLView(View):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def format_error(error):
|
def format_error(error):
|
||||||
if isinstance(error, GraphQLError):
|
if isinstance(error, GraphQLError):
|
||||||
return format_graphql_error(error)
|
return error.formatted(error)
|
||||||
|
|
||||||
return {"message": str(error)}
|
return {"message": str(error)}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user