Skip to content

Commit 0929bad

Browse files
committed
Fix non-async resolvers with returns in the async case
1 parent ef2277c commit 0929bad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

juniper_codegen/src/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ impl GraphQLTypeDefiniton {
901901

902902
quote!(
903903
#name => {
904-
let res #_type = { #code };
904+
let res #_type = (||{ #code })();
905905
let res2 = #juniper_crate_name::IntoResolvable::into(
906906
res,
907907
executor.context()

0 commit comments

Comments
 (0)