(parentTopicId: string)
| 50 | } |
| 51 | |
| 52 | function makeUpdater(parentTopicId: string) { |
| 53 | return (store: RecordSourceSelectorProxy) => { |
| 54 | const payload = store.getRootField('upsertTopic') |
| 55 | if (!payload) { |
| 56 | console.log('payload not found in mutation response') |
| 57 | return |
| 58 | } |
| 59 | |
| 60 | const topicEdge = payload.getLinkedRecord('topicEdge') |
| 61 | if (!topicEdge) { |
| 62 | console.log('no topic edge found in mutation response') |
| 63 | return |
| 64 | } |
| 65 | |
| 66 | return insertEdge(parentTopicId, store, topicEdge) |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | const query = graphql` |
| 71 | mutation upsertTopicMutation( |
no test coverage detected