Make resolvers with returns work again
Note that this only fixes the non-async case
This commit is contained in:
parent
321c3af38d
commit
560a172587
2 changed files with 1 additions and 4 deletions
|
@ -95,8 +95,6 @@ impl Root {
|
|||
Ok(0)
|
||||
}
|
||||
|
||||
/*
|
||||
* FIXME: make this work again
|
||||
fn with_return() -> i32 {
|
||||
return 0;
|
||||
}
|
||||
|
@ -104,7 +102,6 @@ impl Root {
|
|||
fn with_return_field_result() -> FieldResult<i32> {
|
||||
return Ok(0);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
graphql_interface!(Interface: () |&self| {
|
||||
|
|
|
@ -751,7 +751,7 @@ impl GraphQLTypeDefiniton {
|
|||
};
|
||||
quote!(
|
||||
#name => {
|
||||
let res #_type = { #code };
|
||||
let res #_type = (|| { #code })();
|
||||
#juniper_crate_name::IntoResolvable::into(
|
||||
res,
|
||||
executor.context()
|
||||
|
|
Loading…
Reference in a new issue