We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 11a475b + acabb50 commit 9e0d243Copy full SHA for 9e0d243
1 file changed
src/apollo.client.ts
@@ -29,16 +29,14 @@ export const createApolloClient = (httpUrl: string) => {
29
},
30
};
31
});
32
- var accessToken = localStorage.getItem(ACCESS_TOKEN_KEY);
33
+ //@Samox TODO make sure the WSlink uses the accesstoken right after it is created or refreshed
34
const wsLink = new GraphQLWsLink(
35
createClient({
36
url: wsUrl,
37
- connectionParams: accessToken
38
- ? {
39
- authToken: accessToken,
40
- }
41
- : {},
+ connectionParams: {
+ authToken: localStorage.getItem(ACCESS_TOKEN_KEY),
+ },
42
})
43
);
44
0 commit comments