Skip to content

Commit ccd6f8b

Browse files
committed
chore: fix dataconnect integration tests
1 parent f1c5523 commit ccd6f8b

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

test/integration/data-connect.spec.ts

+18-2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,22 @@ chai.use(chaiAsPromised);
2323

2424
const expect = chai.expect;
2525

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+
2642
interface UserResponse {
2743
user: {
2844
name: string;
@@ -59,7 +75,7 @@ interface EmailsResponse {
5975
}
6076

6177
interface UserVariables {
62-
id: string;
78+
id: { uid: string };
6379
}
6480

6581
const connectorConfig: ConnectorConfig = {
@@ -117,7 +133,7 @@ describe('getDataConnect()', () => {
117133
it('executeGraphql() successfully executes a GraphQL query with variables', async () => {
118134
const resp = await getDataConnect(connectorConfig).executeGraphql<UserResponse, UserVariables>(
119135
queryGetUserById,
120-
{ variables: { id: userId } }
136+
{ variables: { id: { uid: userId } } }
121137
);
122138
expect(resp.data.user.name).to.be.not.undefined;
123139
expect(resp.data.user.uid).equals(userId);

0 commit comments

Comments
 (0)