Skip to content

Commit

Permalink
Optimize views (graphql-python#1439)
Browse files Browse the repository at this point in the history
* Optimize execute_graphql_request

* Require operation_ast to be found by view handler

* Remove unused show_graphiql kwarg

* Old style if syntax

* Revert "Remove unused show_graphiql kwarg"

This reverts commit 33b3426.

* Add missing schema validation step

* Pass args directly to improve clarity

* Remove duplicated operation_ast not None check

---------

Co-authored-by: Firas Kafri <3097061+firaskafri@users.noreply.github.com>
Co-authored-by: Kien Dang <mail@kien.ai>
  • Loading branch information
3 people authored and superlevure committed Jan 30, 2024
1 parent 53e416b commit e8525fc
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions graphene_django/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,12 +336,7 @@ def execute_graphql_request(
)
)

validation_errors = validate(
schema,
document,
self.validation_rules,
graphene_settings.MAX_VALIDATION_ERRORS,
)
validation_errors = validate(schema, document)

if validation_errors:
return ExecutionResult(data=None, errors=validation_errors)
Expand Down

0 comments on commit e8525fc

Please sign in to comment.