method

ChildrenDraft.Replace

Replace deliberately replaces a whole node, including behavior and kind.

Arguments

ArgumentTypeDescription
namestringThe name value.
nodeNodeThe node value.

Returns

The declared result.

error

Full signature

func (d *ChildrenDraft) Replace( name string, node Node, ) error

Source field/graph_edit.go:441

Related types

  • ChildrenDraft

    ChildrenDraft owns a detached slice. Committing snapshots again, so retained drafts cannot mutate published graphs. Structural edits are explicit.

  • Node

    Node 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.