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

Function hasErrors

client/src/mutations/upsertLinkMutation.ts:11–22  ·  view source on GitHub ↗
(payload: RecordProxy<{}>)

Source from the content-addressed store, hash-verified

9} from '__generated__/upsertLinkMutation.graphql'
10
11function hasErrors(payload: RecordProxy<{}>) {
12 const errors = (payload.getLinkedRecords('alerts') || []).filter((alert: RecordProxy<{}>) => {
13 return alert.getValue('type') == 'ERROR'
14 })
15
16 if (errors.length !== 0) {
17 console.log('errors present, not updating link connection')
18 return true
19 }
20
21 return false
22}
23
24function makeUpdater(parentTopicId: string | null) {
25 if (!parentTopicId) return null

Callers 1

makeUpdaterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected