(params: {
entityId: EntityId;
entityTypeIds: T["entityTypeIds"];
updatedProperties: T["propertiesWithMetadata"];
})
| 16 | } from "@blockprotocol/type-system"; |
| 17 | |
| 18 | export const updateEntity = <T extends TypeIdsAndPropertiesForEntity>(params: { |
| 19 | entityId: EntityId; |
| 20 | entityTypeIds: T["entityTypeIds"]; |
| 21 | updatedProperties: T["propertiesWithMetadata"]; |
| 22 | }): Promise<HashEntity<T>> => |
| 23 | queryGraphQlApi<UpdateEntityMutation, UpdateEntityMutationVariables>( |
| 24 | updateEntityMutation, |
| 25 | { |
| 26 | entityUpdate: { |
| 27 | entityId: params.entityId, |
| 28 | entityTypeIds: params.entityTypeIds, |
| 29 | propertyPatches: propertyObjectToPatches(params.updatedProperties), |
| 30 | }, |
| 31 | }, |
| 32 | ).then(({ data }) => { |
| 33 | return new HashEntity(data.updateEntity); |
| 34 | }); |
nothing calls this directly
no test coverage detected