Skip to content

Commit 1ae3416

Browse files
committed
chore: cleanup
1 parent 6c46f55 commit 1ae3416

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

graph/src/data/query/result.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use http::header::{
66
CONTENT_TYPE,
77
};
88
use http::StatusCode;
9-
use hyper::{Body, Request};
109
use serde::ser::*;
1110
use serde::Serialize;
1211
use std::convert::TryFrom;

server/http/src/service.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use std::collections::HashMap;
21
use std::convert::TryFrom;
32
use std::pin::Pin;
43
use std::task::Context;
@@ -7,10 +6,8 @@ use std::time::Instant;
76

87
use graph::prelude::serde_json;
98
use graph::prelude::serde_json::json;
10-
use graph::prelude::thiserror::private::DisplayAsDisplay;
119
use graph::prelude::*;
1210
use graph::semver::VersionReq;
13-
use graph::url::Url;
1411
use graph::{components::server::query::GraphQLServerError, data::query::QueryTarget};
1512
use http::header;
1613
use http::header::{
@@ -270,24 +267,6 @@ where
270267
.boxed()
271268
}
272269

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-
291270
fn has_request_body(&self, req: &Request<Body>) -> bool {
292271
if let Some(length) = req.headers().get(hyper::header::CONTENT_LENGTH) {
293272
if let Ok(length) = length.to_str() {

0 commit comments

Comments
 (0)