@nitra/vite-boot 4.0.0 → 4.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nitra/vite-boot",
3
- "version": "4.0.0",
3
+ "version": "4.0.1",
4
4
  "description": "Vite boot",
5
5
  "type": "module",
6
6
  "exports": {
package/src/apollo.js CHANGED
@@ -58,7 +58,7 @@ const authLink = setContext((_, { headers }) => {
58
58
  return prepareHeaders({ ...headers })
59
59
  })
60
60
 
61
- const wsLink = new GraphQLWsLink(
61
+ export const wsLink = new GraphQLWsLink(
62
62
  createClient({
63
63
  url: `${import.meta.env.VITE_HASURA_PROTOCOL}://${import.meta.env.VITE_HASURA_HOST}/v1/graphql`,
64
64
  connectionParams: () => {
package/src/token.js CHANGED
@@ -123,6 +123,7 @@ export async function refreshToken() {
123
123
 
124
124
  // перезавантажуємо щоб він вступив в дію
125
125
  // wsClient.restart()
126
+ wsClient.close()
126
127
  } else {
127
128
  await defaultLogin(check.decoded, result.token)
128
129
  }