-
Notifications
You must be signed in to change notification settings - Fork 436
Closed
Labels
enhancementImprovement of existing features or bugfixImprovement of existing features or bugfix

Description
juniper::object()
macro generates a lambda that has access to the rest of the scope. This is unsafe since the user can access any symbol of the code when juniper::object()
expands.
This is the code I am talking about:
juniper/juniper_codegen/src/impl_object.rs
Lines 198 to 203 in 1148c75
let resolver_code = quote!( | |
(|| #return_ty { | |
#( #resolve_parts )* | |
#body | |
})() | |
); |
It would be better to define a
fn
and give it the needed arguments.Metadata
Metadata
Assignees
Labels
enhancementImprovement of existing features or bugfixImprovement of existing features or bugfix