Add features to juniper_benchmarks
This commit is contained in:
parent
ad3c7ef6d9
commit
6aebe5a30f
2 changed files with 6 additions and 2 deletions
|
@ -10,9 +10,12 @@ edition = "2018"
|
|||
name = "benchmark"
|
||||
harness = false
|
||||
|
||||
[features]
|
||||
async = ["juniper/async", "futures"]
|
||||
|
||||
[dependencies]
|
||||
juniper = { path = "../juniper", features = ["async"] }
|
||||
futures = "=0.3.1"
|
||||
juniper = { path = "../juniper" }
|
||||
futures = { version = "=0.3.1", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
criterion = "0.2.11"
|
||||
|
|
|
@ -105,6 +105,7 @@ pub fn execute(query: &str, vars: Variables) -> QueryResult {
|
|||
juniper::execute(query, None, &root, &vars, &ctx).map_err(|e| format!("{:?}", e))
|
||||
}
|
||||
|
||||
#[cfg(feature = "async")]
|
||||
pub async fn execute_async(query: &str, vars: Variables) -> QueryResult {
|
||||
let root = new_schema();
|
||||
let ctx = Context::new();
|
||||
|
|
Loading…
Reference in a new issue