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

Function queryGraphQlApi

apps/plugin-browser/src/shared/query-graphql-api.ts:5–15  ·  view source on GitHub ↗
(
  query: string,
  variables?: Variables,
)

Source from the content-addressed store, hash-verified

3import { getFromLocalStorage } from "./storage";
4
5export const queryGraphQlApi = async <
6 ReturnData,
7 Variables extends Record<string, unknown>,
8>(
9 query: string,
10 variables?: Variables,
11): Promise<{ data: ReturnData }> => {
12 const apiOrigin = (await getFromLocalStorage("apiOrigin")) ?? API_ORIGIN;
13
14 return queryApi({ client: "browser-extension", query, variables, apiOrigin });
15};

Callers 6

queryEntityTypeSubgraphFunction · 0.90
getFlowRunsFunction · 0.90
getTotalUsageFunction · 0.90
createEntityFunction · 0.90
getUserFunction · 0.90
updateEntityFunction · 0.90

Calls 1

getFromLocalStorageFunction · 0.90

Tested by

no test coverage detected