(
parentTopicId: string, store: RecordSourceSelectorProxy, topicEdge: RecordProxy<{}>,
)
| 12 | export type MatchingTopicsType = NonNullable<ResponseType['upsertTopic']>['matchingTopics'] |
| 13 | |
| 14 | function 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 | |
| 31 | let tmpId = 0 |
| 32 |
no test coverage detected