mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-04 12:23:13 +03:00
Remove redundant call to validate
The call to `validate` in the django view is redundant with the validation call in graphql-core.
This commit is contained in:
parent
0beb3385df
commit
ad87a00438
|
@ -9,7 +9,7 @@ from django.shortcuts import render
|
||||||
from django.utils.decorators import method_decorator
|
from django.utils.decorators import method_decorator
|
||||||
from django.views.decorators.csrf import ensure_csrf_cookie
|
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
|
||||||
from graphql.error import GraphQLError
|
from graphql.error import GraphQLError
|
||||||
from graphql.execution import ExecutionResult
|
from graphql.execution import ExecutionResult
|
||||||
|
|
||||||
|
@ -303,11 +303,7 @@ class GraphQLView(View):
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
validation_errors = validate(self.schema.graphql_schema, document)
|
|
||||||
if validation_errors:
|
|
||||||
return ExecutionResult(data=None, errors=validation_errors)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
extra_options = {}
|
extra_options = {}
|
||||||
if self.execution_context_class:
|
if self.execution_context_class:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user