Function: commitData
▸ commitData(input
): ReturnType
\<SolidLdoTransactionDataset
["commitToPod"
]>
Commits the transaction to the global dataset, syncing all subscribing components and Solid Pods
Parameters
Name | Type | Description |
---|---|---|
input |
LdoBase |
A transactable linked data object |
Returns
ReturnType
\<SolidLdoTransactionDataset
["commitToPod"
]>
Example
import { changeData } from "@ldo/solid";
// ...
const profile = solidLdoDataset
.using(ProfileShapeType)
.fromSubject("https://example.com/profile#me");
const resource = solidLdoDataset.getResource("https://example.com/profile");
const cProfile = changeData(profile, resource);
cProfile.name = "My New Name";
const result = await commitData(cProfile);