(h)
| 24 | * e.g. `$project/$configuration.get` -> `["$project"]` |
| 25 | * e.g. `$project/$configuration/$something.get` -> `["$project","$configuration"]` |
| 26 | */ |
| 27 | export const defaultGetQueryKey: GetQueryKey = (h) => { |
| 28 | const key = makeQueryKey(h) |
| 29 | const ns = key.filter((_) => _.startsWith("$")) |
| 30 | const k = ns.length ? ns.length > 1 ? ns.slice(0, ns.length - 1) : ns : undefined |
| 31 | if (!k) throw new Error("empty query key for: " + h.id) |
| 32 | return k |
| 33 | } |
| 34 | |
| 35 | let activeGetQueryKey: GetQueryKey = defaultGetQueryKey |
nothing calls this directly
no test coverage detected
searching dependent graphs…