Skip to content

Commit 77628ab

Browse files
committed
fixes
1 parent 3c723ab commit 77628ab

File tree

6 files changed

+11
-14
lines changed

6 files changed

+11
-14
lines changed

graph/src/data/query/error.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -292,18 +292,18 @@ impl fmt::Display for QueryExecutionError {
292292
}
293293
}
294294

295-
impl From<QueryExecutionError> for Vec<QueryExecutionError> {
296-
fn from(e: QueryExecutionError) -> Self {
297-
vec![e]
298-
}
299-
}
300-
301295
impl From<ValidationError> for QueryExecutionError {
302296
fn from(e: ValidationError) -> Self {
303297
QueryExecutionError::ValidationError(e.locations.clone().into_iter().nth(0), e.message)
304298
}
305299
}
306300

301+
impl From<QueryExecutionError> for Vec<QueryExecutionError> {
302+
fn from(e: QueryExecutionError) -> Self {
303+
vec![e]
304+
}
305+
}
306+
307307
impl From<FromHexError> for QueryExecutionError {
308308
fn from(e: FromHexError) -> Self {
309309
QueryExecutionError::ValueParseError("Bytes".to_string(), e.to_string())

graph/src/data/query/result.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ impl QueryResults {
172172
}
173173
}
174174

175-
/// The result of running a GraphQL query.
175+
/// The result of running a query, if successful.
176176
#[derive(Debug, Serialize)]
177177
pub struct QueryResult {
178178
#[serde(

graphql/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ anyhow = "1.0"
2121
[dev-dependencies]
2222
pretty_assertions = "1.0.0"
2323
test-store = { path = "../store/test-store" }
24-
graph-chain-ethereum = { path = "../chain/ethereum" }
24+
graph-chain-ethereum = { path = "../chain/ethereum" }

graphql/src/runner.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,10 @@ where
210210
// point, and everything needs to go through the `store` we are
211211
// setting up here
212212
let store = self.store.query_store(target, false).await?;
213-
let schema = store.api_schema()?;
214213
let state = store.deployment_state().await?;
215214
let network = Some(store.network_name().to_string());
216-
215+
let schema = store.api_schema()?;
216+
217217
// Test only, see c435c25decbc4ad7bbbadf8e0ced0ff2
218218
#[cfg(debug_assertions)]
219219
let state = INITIAL_DEPLOYMENT_STATE_FOR_TESTS

node/src/manager/commands/query.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ pub async fn run(
3131
};
3232

3333
let document = graphql_parser::parse_query(&query)?.into_static();
34-
// Ideally, `validate` phase should happen here, but we don't have the schema at this point,
35-
// so we call it in `graphql/runner.rs` instead, where we have the api schema loaded.
36-
3734
let vars: Vec<(String, r::Value)> = vars
3835
.into_iter()
3936
.map(|v| {

store/test-store/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ lazy_static = "1.1"
1616
hex-literal = "0.3"
1717
diesel = { version = "1.4.8", features = ["postgres", "serde_json", "numeric", "r2d2"] }
1818
graph-chain-ethereum = { path = "../../chain/ethereum" }
19-
graphql-tools = "0.0.8"
19+
graphql-tools = "0.0.8"

0 commit comments

Comments
 (0)