Skip to content

Commit 515514e

Browse files
committed
Improved imports code, and catch mechanism
1 parent 36da298 commit 515514e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sanic_graphql/graphqlview.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
from graphql.type.schema import GraphQLSchema
1010
from graphql.execution.executors.asyncio import AsyncioExecutor
11-
from graphql_server import run_http_query, HttpQueryError, default_format_error, load_json_body, encode_execution_results, json_encode
11+
from graphql_server import (HttpQueryError, default_format_error,
12+
encode_execution_results, json_encode,
13+
load_json_body, run_http_query)
1214

1315
from .render_graphiql import render_graphiql
1416

@@ -73,7 +75,7 @@ async def dispatch_request(self, request, *args, **kwargs):
7375
data = self.parse_body(request)
7476

7577
show_graphiql = request_method == 'get' and self.should_display_graphiql(request)
76-
catch = HttpQueryError if show_graphiql else None
78+
catch = show_graphiql
7779

7880
pretty = self.pretty or show_graphiql or request.args.get('pretty')
7981

0 commit comments

Comments
 (0)