jejunum
jejunum
CCConvex Community
Created by jejunum on 2/27/2024 in #support-community
Unknown Database Bandwidth Usage
No description
10 replies
CCConvex Community
Created by jejunum on 2/1/2024 in #support-community
useQuery Rerendering whenever new data is patched
No description
13 replies
CCConvex Community
Created by jejunum on 2/1/2024 in #support-community
Appending to Array using Mutation
A super simple question but I couldn't find too much on this, I have a data schema for a node which contains a childArray[]. What is the mutation call for appending to an array?
node: defineTable({
// Array of childNodes
childNodes: v.array(v.string()),
})
node: defineTable({
// Array of childNodes
childNodes: v.array(v.string()),
})
For some more context, this is what I have at the moment for my array push function... (syntax is wrong!):
const node = await ctx.db.patch(args.parentNode, {
$push: {childNodes: args.childNode},
});
const node = await ctx.db.patch(args.parentNode, {
$push: {childNodes: args.childNode},
});
Effectively, I need a function that appends a storageId into childNodes :3 Thanks
22 replies