In the docs for Lambda it says you can pass a single argument or an array of arguments. Can you pass a single object as an argument? The reason being that if you are passing a lot of data to a lambda, getting the right order in an array is prone to error, but object passing is much easier.
Here is an example:
export default CreateFunction({
name: "create_account",
body: Query(
Lambda(
"args",
CreateAccount({
domain: Select(["email"], Var("args")),
name: Select(["name"], Var("args")),
})
)
),
role: Role("functionrole_create_account"),
});