File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -341,20 +341,19 @@ async def run(
341341
342342 allowed_operation_types = operation_type_from_http (request_adapter .method )
343343
344- if not self .allow_queries_via_get and request_adapter .method == "GET" :
345- allowed_operation_types = allowed_operation_types - {OperationType .QUERY }
346-
347344 if request_adapter .method == "GET" :
348345 if not self .allow_queries_via_get :
349346 allowed_operation_types = allowed_operation_types - {
350347 OperationType .QUERY
351348 }
352349
353- should_render_graphql_ide = self .should_render_graphql_ide (request_adapter )
354350 if self .graphql_ide :
355- if should_render_graphql_ide :
351+ if self . should_render_graphql_ide ( request_adapter ) :
356352 return await self .render_graphql_ide (request , request_data )
357- elif should_render_graphql_ide :
353+ elif (
354+ not request_adapter .content_type
355+ or "application/json" not in request_adapter .content_type
356+ ):
358357 raise HTTPException (404 , "Not Found" ) # pragma: no cover
359358
360359 sub_response = await self .get_sub_response (request )
Original file line number Diff line number Diff line change @@ -193,11 +193,13 @@ def run(
193193 OperationType .QUERY
194194 }
195195
196- should_render_graphql_ide = self .should_render_graphql_ide (request_adapter )
197196 if self .graphql_ide :
198- if should_render_graphql_ide :
197+ if self . should_render_graphql_ide ( request_adapter ) :
199198 return self .render_graphql_ide (request , request_data )
200- elif should_render_graphql_ide :
199+ elif (
200+ not request_adapter .content_type
201+ or "application/json" not in request_adapter .content_type
202+ ):
201203 raise HTTPException (404 , "Not Found" ) # pragma: no cover
202204
203205 sub_response = self .get_sub_response (request )
You can’t perform that action at this time.
0 commit comments