Skip to content

Commit 304c824

Browse files
committed
run validations as soon as possible
1 parent 18e8620 commit 304c824

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

graphql/src/runner.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,8 @@ where
204204
// point, and everything needs to go through the `store` we are
205205
// setting up here
206206
let store = self.store.query_store(target, false).await?;
207-
let state = store.deployment_state().await?;
208-
let network = Some(store.network_name().to_string());
209207
let schema = store.api_schema()?;
208+
210209
let validation_errors = validate(
211210
&schema.document(),
212211
&query.document,
@@ -217,6 +216,9 @@ where
217216
return Ok(QueryResults::from(QueryResult::from(validation_errors)));
218217
}
219218

219+
let state = store.deployment_state().await?;
220+
let network = Some(store.network_name().to_string());
221+
220222
// Test only, see c435c25decbc4ad7bbbadf8e0ced0ff2
221223
#[cfg(debug_assertions)]
222224
let state = INITIAL_DEPLOYMENT_STATE_FOR_TESTS

0 commit comments

Comments
 (0)