MCPcopy Create free account
hub / github.com/alephdata/aleph / selectResult

Function selectResult

ui/src/selectors.js:34–54  ·  view source on GitHub ↗
(state, query, expand, mutationKey)

Source from the content-addressed store, hash-verified

32}
33
34function selectResult(state, query, expand, mutationKey) {
35 if (!query || !query.path) {
36 return {
37 ...loadState(),
38 results: [],
39 shouldLoad: false,
40 shouldLoadDeep: false,
41 isPending: true,
42 };
43 }
44 const result = {
45 results: [],
46 ...selectObject(state, state.results, query.toKey(), mutationKey),
47 };
48 if (expand) {
49 result.results = result.results
50 .map((id) => expand(state, id))
51 .filter((r) => r.id !== undefined);
52 }
53 return result;
54}
55
56export function selectLocale(state) {
57 // determine the active locale to be used by the user interface. this is

Callers 11

selectAlertResultFunction · 0.85
selectMappingsResultFunction · 0.85
selectCollectionsResultFunction · 0.85
selectRolesResultFunction · 0.85
selectEntitiesResultFunction · 0.85
selectEntitySetsResultFunction · 0.85
selectSimilarResultFunction · 0.85
selectBookmarksResultFunction · 0.85

Calls 4

loadStateFunction · 0.90
selectObjectFunction · 0.85
toKeyMethod · 0.80
expandFunction · 0.50

Tested by

no test coverage detected