MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / buildQueryKeyPart

Function buildQueryKeyPart

console/src/api/buildQueryKeySchema.ts:22–32  ·  view source on GitHub ↗
(
  scope: string,
  queryKeyPart: TQueryKeyPart = {} as TQueryKeyPart,
)

Source from the content-addressed store, hash-verified

20 * @returns - The original query key part with 'scope' attached to it
21 */
22export function buildQueryKeyPart<
23 TQueryKeyPart extends Record<string, unknown> = Record<string, never>,
24>(
25 scope: string,
26 queryKeyPart: TQueryKeyPart = {} as TQueryKeyPart,
27): TQueryKeyPart & { scope: string } {
28 return {
29 scope,
30 ...(queryKeyPart ?? {}),
31 };
32}
33
34/**
35 * A function that takes a scope (used for identification) and returns a query key with the region id.

Callers 15

queries.tsFile · 0.90
showCreateQueryKeyFunction · 0.90
frontegg.tsFile · 0.90
clusterMetricsQueryKeyFunction · 0.90
cloudGlobalApi.tsFile · 0.90
queries.tsFile · 0.90
queries.tsFile · 0.90
queries.tsFile · 0.90
queries.tsFile · 0.90
queries.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected