/home/freephoenix888/Programming/deep/payments-tinkoff-c2b-test/node_modules/@deep-foundation/deeplinks/imports/client.js:307
throw new Error('apolloClient is invalid');
^
Error: apolloClient is invalid
at DeepClient (/home/freephoenix888/Programming/deep/payments-tinkoff-c2b-test/node_modules/@deep-foundation/deeplinks/imports/client.js:307:19)
at main (/home/freephoenix888/Programming/deep/payments-tinkoff-c2b-test/demo/demo.ts:20:16)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v18.17.1
Code
const apolloClient = generateApolloClient({
path: '3006-deepfoundation-dev-a31.ws-us107.gitpod.io/gql', // Url here is fake. When I use the actual urk it in browser - it opens, so I have no typo in url
ssl: true,
});
const unloginedDeep = new DeepClient({ apolloClient });
const guest = await unloginedDeep.guest();
const guestDeep = new DeepClient({ deep: unloginedDeep, ...guest });
const admin = await guestDeep.login({
linkId: await guestDeep.id('deep', 'admin'),
});
const deep = new DeepClient({ deep: guestDeep, ...admin });
Description
Error happens on this line:
const deep = new DeepClient({ deep: guestDeep, ...admin });
Error
Code
Description
Error happens on this line:
This code was working before. I have taken it from my cheatsheet: https://github.com/deep-foundation/documentation/wiki/CheatSheet#sample-typescript-application-with-initialized-deepclient
I was always using this code for initializing deep client. What is wrong now?
How to reproduce
Run this test
https://github.com/deep-foundation/deeplinks/blob/6307c8bea984c0674a8380d3935accb0566021f0/tests/client.tsx#L46-L62
by using the following command:
npm run test -- --testNamePattern "deep.linkId guest and login"
The test is not passed: