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

Function ensureHashSystemAccountExists

apps/hash-api/src/graph/system-account.ts:12–23  ·  view source on GitHub ↗
(params: {
  logger: Logger;
  context: ImpureGraphContext;
})

Source from the content-addressed store, hash-verified

10 * method is designed to be run before the system types are initialized.
11 */
12export const ensureHashSystemAccountExists = async (params: {
13 logger: Logger;
14 context: ImpureGraphContext;
15}) => {
16 const { logger, context } = params;
17
18 systemAccountId = await context.graphApi
19 .getOrCreateSystemMachine("h")
20 .then(({ data: machineId }) => machineId as MachineId);
21
22 logger.info(`Using system account ${systemAccountId}`);
23};

Callers 4

mainFunction · 0.90
setup-admin.tsFile · 0.90
resolveTargetWebIdFunction · 0.90

Calls 2

thenMethod · 0.80
infoMethod · 0.80

Tested by

no test coverage detected