File tree Expand file tree Collapse file tree 2 files changed +0
-22
lines changed Expand file tree Collapse file tree 2 files changed +0
-22
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ use http::header::{
6
6
CONTENT_TYPE ,
7
7
} ;
8
8
use http:: StatusCode ;
9
- use hyper:: { Body , Request } ;
10
9
use serde:: ser:: * ;
11
10
use serde:: Serialize ;
12
11
use std:: convert:: TryFrom ;
Original file line number Diff line number Diff line change 1
- use std:: collections:: HashMap ;
2
1
use std:: convert:: TryFrom ;
3
2
use std:: pin:: Pin ;
4
3
use std:: task:: Context ;
@@ -7,10 +6,8 @@ use std::time::Instant;
7
6
8
7
use graph:: prelude:: serde_json;
9
8
use graph:: prelude:: serde_json:: json;
10
- use graph:: prelude:: thiserror:: private:: DisplayAsDisplay ;
11
9
use graph:: prelude:: * ;
12
10
use graph:: semver:: VersionReq ;
13
- use graph:: url:: Url ;
14
11
use graph:: { components:: server:: query:: GraphQLServerError , data:: query:: QueryTarget } ;
15
12
use http:: header;
16
13
use http:: header:: {
@@ -270,24 +267,6 @@ where
270
267
. boxed ( )
271
268
}
272
269
273
- /// Handles requests without query param.
274
- async fn handle_requests_without_query_param ( & self ) -> GraphQLServiceResponse {
275
- async {
276
- let response_obj = json ! ( {
277
- "message" : "`query` param has to be provided!"
278
- } ) ;
279
- let response_str = serde_json:: to_string ( & response_obj) . unwrap ( ) ;
280
-
281
- Ok ( Response :: builder ( )
282
- . status ( 400 )
283
- . header ( CONTENT_TYPE , "application/json" )
284
- . header ( ACCESS_CONTROL_ALLOW_ORIGIN , "*" )
285
- . body ( Body :: from ( response_str) )
286
- . unwrap ( ) )
287
- }
288
- . boxed ( )
289
- }
290
-
291
270
fn has_request_body ( & self , req : & Request < Body > ) -> bool {
292
271
if let Some ( length) = req. headers ( ) . get ( hyper:: header:: CONTENT_LENGTH ) {
293
272
if let Ok ( length) = length. to_str ( ) {
You can’t perform that action at this time.
0 commit comments