If I want to create an FQL for updating a collection I would like to just pass the object to the collection as not all fields may be updated. In JS this is easy as you can just pass the object to the update function but how would you do this for a UDF?
This is what I tried but it doesn’t seem like you can use Var for objects as parameters:
CreateFunction({
name: 'update_user',
body: Query(
Lambda(
['id', 'updateBody'],
Update(
Ref(Collection('users'), Var('id')),
Var('updateBody')
)
)
)
})