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:
shukryzablah 2023-03-14 18:14:14 -04:00 committed by GitHub
parent 0beb3385df
commit ad87a00438
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,7 +9,7 @@ from django.shortcuts import render
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import ensure_csrf_cookie
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.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:
extra_options = {}
if self.execution_context_class: