File tree 1 file changed +14
-5
lines changed
1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import CloudGraph, {
7
7
ServiceConnection ,
8
8
Client ,
9
9
Logger ,
10
+ EntityMutations ,
10
11
} from '@cloudgraph/sdk'
11
12
12
13
import { scanReport , scanDataType , scanResult } from '../reports'
@@ -133,9 +134,11 @@ export const processConnectionsBetweenEntities = ({
133
134
134
135
if ( storageRunning ) {
135
136
// Add service mutation to promises array
137
+ const query : string =
138
+ ( mutation as EntityMutations ) ?. upsert || ( mutation as string )
136
139
storageEngine . push ( {
137
140
query :
138
- mutation ||
141
+ query ||
139
142
( provider &&
140
143
generateMutation ( { type : 'add' , provider, entity, schemaMap } ) ) ||
141
144
'' ,
@@ -165,10 +168,16 @@ export function insertEntitiesAndConnections({
165
168
return getConnectedEntity ( service , providerData , name )
166
169
} )
167
170
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
+ } )
172
181
}
173
182
} catch ( error ) {
174
183
logger . debug ( error )
You can’t perform that action at this time.
0 commit comments