FQL v4 will be decommissioned on June 30, 2025. Ensure that you complete your migration from FQL v4 to FQL v10 by that date. Fauna accounts created after August 21, 2024 must use FQL v10. These accounts will not be able to run FQL v4 queries or access the v4 Dashboard. For more details, see the v4 EOL announcement and migration guide. Contact support@fauna.com with any questions. |
Call a function
Creating and updating a function requires:
|
Solution
Use the Call
function:
{
ref: Ref(Collection("posts"), "300221794335326720"),
ts: 1622572664480000,
data: { title: 'First Post Title', body: 'This is my first blog post!' }
}
{'ref': Ref(id=300221798539067904, collection=Ref(id=posts, collection=Ref(id=collections))), 'ts': 1622572668490000, 'data': {'title': 'First Post Title', 'body': 'This is my first blog post!'}}
map[data:map[body:This is my first blog post! title:First Post Title] ref:{300221752288477696 0xc00009b8f0 0xc00009b8f0 <nil>} ts:1622572624380000]
ObjectV(ref: RefV(id = "300221738176741888", collection = RefV(id = "posts", collection = RefV(id = "collections"))),ts: LongV(1622572610930000),data: ObjectV(title: StringV(First Post Title),body: StringV(This is my first blog post!)))
{ref: ref(id = "300221779190743552", collection = ref(id = "posts", collection = ref(id = "collections"))), ts: 1622572650040000, data: {title: "First Post Title", body: "this is my first blog post!"}}
{
ref: Ref(Collection("posts"), "302044131605086720"),
ts: 1624310580730000,
data: { title: 'First Post Title', body: 'This is my first blog post!' }
}
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!