diff --git a/server_fn_macro/src/lib.rs b/server_fn_macro/src/lib.rs index 4e0c6b7c91..f5b43e7f9a 100644 --- a/server_fn_macro/src/lib.rs +++ b/server_fn_macro/src/lib.rs @@ -110,7 +110,10 @@ pub fn server_macro_impl( } FnArg::Typed(t) => t, }; - quote! { pub #typed_arg } + quote! { + #[serde(default)] + pub #typed_arg + } }); let cx_arg = body.inputs.iter().next().and_then(|f| {