Apply an AG-UI STATE_SNAPSHOT to the graph. Each mapped slice is written as an entity. Snapshots default to replace semantics when the mapping does not specify otherwise is left to the mapping's write field (default upsert).
replace
write
applyAgUiSnapshot(event, { mappings: [ { entityType: "Order", pointer: "/order", kind: "single", write: "replace" }, { entityType: "LineItem", pointer: "/order/items", kind: "collection" },]}); Copy
applyAgUiSnapshot(event, { mappings: [ { entityType: "Order", pointer: "/order", kind: "single", write: "replace" }, { entityType: "LineItem", pointer: "/order/items", kind: "collection" },]});
Apply an AG-UI STATE_SNAPSHOT to the graph. Each mapped slice is written as an entity. Snapshots default to
replacesemantics when the mapping does not specify otherwise is left to the mapping'swritefield (default upsert).