MCPcopy Create free account
hub / github.com/emwalker/digraph / prepareVariablesFn

Function prepareVariablesFn

client/src/router.tsx:29–40  ·  view source on GitHub ↗
(viewer: Express.User)

Source from the content-addressed store, hash-verified

27}
28
29const prepareVariablesFn = (viewer: Express.User) => (variables: FoundRelayVariables) => {
30 const viewerId = viewer?.id || ''
31 const sessionId = viewer?.sessionId || ''
32 const { topicId, searchString } = variables
33
34 return {
35 topicId,
36 sessionId,
37 viewerId,
38 searchString: searchString || '',
39 }
40}
41
42export const createRouteConfig = (store: RouteStore) => {
43 const { viewer } = store.getState()

Callers 1

createRouteConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected