MCPcopy Index your code
hub / github.com/emwalker/digraph / insertEdge

Function insertEdge

client/src/mutations/upsertTopicMutation.ts:14–29  ·  view source on GitHub ↗
(
  parentTopicId: string, store: RecordSourceSelectorProxy, topicEdge: RecordProxy<{}>,
)

Source from the content-addressed store, hash-verified

12export type MatchingTopicsType = NonNullable<ResponseType['upsertTopic']>['matchingTopics']
13
14function insertEdge(
15 parentTopicId: string, store: RecordSourceSelectorProxy, topicEdge: RecordProxy<{}>,
16) {
17 const connectionId = ConnectionHandler.getConnectionID(parentTopicId,
18 'ViewTopicPage_topic_children', { searchString: '' })
19
20 if (!connectionId) {
21 console.log('connection id not found for parent topic:', parentTopicId)
22 return
23 }
24
25 const connection = store.get(connectionId)
26 if (!connection) return
27
28 ConnectionHandler.insertEdgeBefore(connection, topicEdge)
29}
30
31let tmpId = 0
32

Callers 2

makeOptimisticUpdaterFunction · 0.85
makeUpdaterFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected