From ccd6f8b9c1a24a70c978dd256d2a9ae07392a5e1 Mon Sep 17 00:00:00 2001 From: Lahiru Maramba Date: Tue, 22 Oct 2024 16:04:11 -0400 Subject: [PATCH] chore: fix dataconnect integration tests --- test/integration/data-connect.spec.ts | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/test/integration/data-connect.spec.ts b/test/integration/data-connect.spec.ts index 91179c12e3..32ea83cb87 100644 --- a/test/integration/data-connect.spec.ts +++ b/test/integration/data-connect.spec.ts @@ -23,6 +23,22 @@ chai.use(chaiAsPromised); const expect = chai.expect; +/* +// Schema +type User @table(key: "uid") { + uid: String! + name: String! + address: String! +} + +type Email @table { + subject: String! + date: Date! + text: String! + from: User! +} +*/ + interface UserResponse { user: { name: string; @@ -59,7 +75,7 @@ interface EmailsResponse { } interface UserVariables { - id: string; + id: { uid: string }; } const connectorConfig: ConnectorConfig = { @@ -117,7 +133,7 @@ describe('getDataConnect()', () => { it('executeGraphql() successfully executes a GraphQL query with variables', async () => { const resp = await getDataConnect(connectorConfig).executeGraphql( queryGetUserById, - { variables: { id: userId } } + { variables: { id: { uid: userId } } } ); expect(resp.data.user.name).to.be.not.undefined; expect(resp.data.user.uid).equals(userId);