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(
341
341
342
342
allowed_operation_types = operation_type_from_http (request_adapter .method )
343
343
344
- if not self .allow_queries_via_get and request_adapter .method == "GET" :
345
- allowed_operation_types = allowed_operation_types - {OperationType .QUERY }
346
-
347
344
if request_adapter .method == "GET" :
348
345
if not self .allow_queries_via_get :
349
346
allowed_operation_types = allowed_operation_types - {
350
347
OperationType .QUERY
351
348
}
352
349
353
- should_render_graphql_ide = self .should_render_graphql_ide (request_adapter )
354
350
if self .graphql_ide :
355
- if should_render_graphql_ide :
351
+ if self . should_render_graphql_ide ( request_adapter ) :
356
352
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
+ ):
358
357
raise HTTPException (404 , "Not Found" ) # pragma: no cover
359
358
360
359
sub_response = await self .get_sub_response (request )
Original file line number Diff line number Diff line change @@ -193,11 +193,13 @@ def run(
193
193
OperationType .QUERY
194
194
}
195
195
196
- should_render_graphql_ide = self .should_render_graphql_ide (request_adapter )
197
196
if self .graphql_ide :
198
- if should_render_graphql_ide :
197
+ if self . should_render_graphql_ide ( request_adapter ) :
199
198
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
+ ):
201
203
raise HTTPException (404 , "Not Found" ) # pragma: no cover
202
204
203
205
sub_response = self .get_sub_response (request )
You can’t perform that action at this time.
0 commit comments