diff --git a/juniper_codegen/src/util.rs b/juniper_codegen/src/util.rs index 3182aedb..d6a71d59 100644 --- a/juniper_codegen/src/util.rs +++ b/juniper_codegen/src/util.rs @@ -901,7 +901,7 @@ impl GraphQLTypeDefiniton { quote!( #name => { - let res #_type = { #code }; + let res #_type = (||{ #code })(); let res2 = #juniper_crate_name::IntoResolvable::into( res, executor.context()