File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import CloudGraph, {
77 ServiceConnection ,
88 Client ,
99 Logger ,
10+ EntityMutations ,
1011} from '@cloudgraph/sdk'
1112
1213import { scanReport , scanDataType , scanResult } from '../reports'
@@ -133,9 +134,11 @@ export const processConnectionsBetweenEntities = ({
133134
134135 if ( storageRunning ) {
135136 // Add service mutation to promises array
137+ const query : string =
138+ ( mutation as EntityMutations ) ?. upsert || ( mutation as string )
136139 storageEngine . push ( {
137140 query :
138- mutation ||
141+ query ||
139142 ( provider &&
140143 generateMutation ( { type : 'add' , provider, entity, schemaMap } ) ) ||
141144 '' ,
@@ -165,10 +168,16 @@ export function insertEntitiesAndConnections({
165168 return getConnectedEntity ( service , providerData , name )
166169 } )
167170 if ( storageRunning ) {
168- const query =
169- mutation ||
170- generateMutation ( { type : 'add' , provider, entity, schemaMap } )
171- storageEngine . push ( { query, input : connectedData , name } )
171+ const query : string =
172+ ( mutation as EntityMutations ) ?. upsert || ( mutation as string )
173+ storageEngine . push ( {
174+ query :
175+ query ||
176+ generateMutation ( { type : 'add' , provider, entity, schemaMap } ) ||
177+ '' ,
178+ input : connectedData ,
179+ name,
180+ } )
172181 }
173182 } catch ( error ) {
174183 logger . debug ( error )
You can’t perform that action at this time.
0 commit comments