Rename a function
Creating and updating a function requires:
|
Solution
Use the Update
function:
{
ref: Function("create_post"),
ts: 1624310581310000,
name: 'create_post',
body: Query(Lambda(["title", "body", "author"], Create(Collection("posts"), {data: {title: Var("title"), body: Var("body"), author: Var("author")}})))
}
Discussion
After a function has been renamed, any queries that attempt to call the function by its old name fail.
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!