@@ -18,8 +18,8 @@ const updateDevice = async (_, args, { loaders }) => {
18
18
logger . info ( "Executing MUTATION| UpdateDevice" ) ;
19
19
const { deviceId, name, port, agentDb } = args ;
20
20
await dal . updateDevice ( deviceId , name , port , agentDb ) ;
21
- const deviceObj = await dal . searchOneDevice ( deviceId ) ;
22
- await loaders . devices . prime ( deviceId , deviceObj [ 0 ] ) ;
21
+ await loaders . devices . clear ( args . deviceId ) ;
22
+ await loaders . devices . load ( args . deviceId ) ;
23
23
return true ;
24
24
} ;
25
25
@@ -33,7 +33,9 @@ const removeDevice = async (_, args, { loaders }) => {
33
33
34
34
const startSimulation = async ( _ , { deviceId } ) => {
35
35
logger . info ( "Executing MUTATION| startSimulation" ) ;
36
- return await grpcStartSimulation ( deviceId ) ;
36
+ const response = await grpcStartSimulation ( deviceId ) ;
37
+ logger . info ( `Resolved response [${ response } ]` ) ;
38
+ return response ;
37
39
} ;
38
40
39
41
const stopSimulation = async ( _ , { deviceId } ) => {
@@ -43,7 +45,9 @@ const stopSimulation = async (_, { deviceId }) => {
43
45
44
46
const fixAgentDb = async ( _ , { agentDb } ) => {
45
47
logger . info ( "Executing MUTATION| fixAgent" ) ;
46
- return await grpcFixDbAgent ( agentDb ) ;
48
+ const response = await grpcFixDbAgent ( agentDb ) ;
49
+ logger . info ( `Resolved response [${ response } ]` ) ;
50
+ return response ;
47
51
} ;
48
52
49
53
export default {
0 commit comments