MCPcopy Create free account
hub / github.com/hashintel/hash / propertyObjectToPatches

Function propertyObjectToPatches

libs/@local/graph/sdk/typescript/src/entity.ts:442–451  ·  view source on GitHub ↗
(
  object: PropertyObjectWithMetadata,
)

Source from the content-addressed store, hash-verified

440 | SerializedEntity<Properties>;
441
442export const propertyObjectToPatches = (
443 object: PropertyObjectWithMetadata,
444): PropertyPatchOperation[] =>
445 typedEntries(object.value).map(([propertyTypeBaseUrl, property]) => {
446 return {
447 op: "add",
448 path: [propertyTypeBaseUrl],
449 property,
450 };
451 });
452
453/**
454 * Creates an array of PropertyPatchOperations that, if applied, will transform the oldProperties into the

Callers 4

updateEntityFunction · 0.90
upgradeWebEntitiesFunction · 0.90
createFileEntityFromUrlFunction · 0.90

Calls 2

typedEntriesFunction · 0.90
mapMethod · 0.45

Tested by

no test coverage detected