You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: imports/client-handler.tsx
+10-5Lines changed: 10 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,23 @@
1
1
import{DeepClient}from'./client.js';
2
2
import{gql}from'@apollo/client/index.js';
3
3
4
-
exportasyncfunctionevalClientHandler({
5
-
value,
6
-
deep,
7
-
input ={},
8
-
}: {
4
+
/**
5
+
* Evaluates a client handler
6
+
* @returns A promise that resolves to an object with either an error property that contains error or data property that contains result of the handler.
7
+
*/
8
+
exportasyncfunctionevalClientHandler(options: {
9
9
value: string;
10
10
deep: DeepClient;
11
11
input?: any;
12
12
}): Promise<{
13
13
error?: any;
14
14
data?: any;
15
15
}>{
16
+
const{
17
+
value,
18
+
deep,
19
+
input ={},
20
+
}=options;
16
21
try{
17
22
console.log('evalClientHandler','value',value);
18
23
// const evalResult = (new Function(`return ${value}`))();
0 commit comments