File tree 1 file changed +18
-2
lines changed
1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,22 @@ chai.use(chaiAsPromised);
23
23
24
24
const expect = chai . expect ;
25
25
26
+ /*
27
+ // Schema
28
+ type User @table (key: "uid") {
29
+ uid: String!
30
+ name: String!
31
+ address: String!
32
+ }
33
+
34
+ type Email @table {
35
+ subject: String!
36
+ date: Date!
37
+ text: String!
38
+ from: User!
39
+ }
40
+ */
41
+
26
42
interface UserResponse {
27
43
user : {
28
44
name : string ;
@@ -59,7 +75,7 @@ interface EmailsResponse {
59
75
}
60
76
61
77
interface UserVariables {
62
- id : string ;
78
+ id : { uid : string } ;
63
79
}
64
80
65
81
const connectorConfig : ConnectorConfig = {
@@ -117,7 +133,7 @@ describe('getDataConnect()', () => {
117
133
it ( 'executeGraphql() successfully executes a GraphQL query with variables' , async ( ) => {
118
134
const resp = await getDataConnect ( connectorConfig ) . executeGraphql < UserResponse , UserVariables > (
119
135
queryGetUserById ,
120
- { variables : { id : userId } }
136
+ { variables : { id : { uid : userId } } }
121
137
) ;
122
138
expect ( resp . data . user . name ) . to . be . not . undefined ;
123
139
expect ( resp . data . user . uid ) . equals ( userId ) ;
You can’t perform that action at this time.
0 commit comments