method
ChildrenDraft.Replace
Replace deliberately replaces a whole node, including behavior and kind.
Arguments
| Argument | Type | Description |
|---|---|---|
name | string | The name value. |
node | Node | The node value. |
Returns
The declared result.
errorFull signature
func (d *ChildrenDraft) Replace(
name string,
node Node,
) errorRelated types
ChildrenDraftChildrenDraft owns a detached slice. Committing snapshots again, so retained drafts cannot mutate published graphs. Structural edits are explicit.
NodeNode is any field definition that can be placed in Fields. Authors normally create nodes with constructors such as Text, Select, Group, or Array and use their concrete fluent methods before adding them to a field list. The interface is sealed so Ridu can snapshot every supported field safely.