Skip to content

Commit d1d1c25

Browse files
author
Manu
committed
update readme and github workflow
1 parent 035dd86 commit d1d1c25

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

.github/workflows/main.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ jobs:
77
runs-on: ${{ matrix.os }}
88
strategy:
99
matrix:
10-
node: ['12.x', '14.x']
11-
os: [ubuntu-latest, windows-latest, macOS-latest]
10+
node: ['14.x']
11+
os: [ubuntu-latest]
1212

1313
steps:
1414
- name: Checkout repo

README.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ import React from 'react';
1515
import ReactDOM from 'react-dom';
1616
import './index.less';
1717
import App from './App';
18-
import { ApolloClient, ApolloProvider } from '@apollo/client';
19-
import { gqlClient } from 'graphql-react-client';
18+
import { ApolloClient, ApolloProvider, gqlClient } from 'graphql-react-client';
2019
import authService from './shared/services/authService';
2120

2221
gqlClient.init({
@@ -26,9 +25,9 @@ gqlClient.init({
2625
});
2726

2827
async function initScope(scope) {
29-
const sessionData: any = await authService.getSessionData();
30-
authService.login(sessionData);
31-
return sessionData?.mainRole === 'TYPE_CUSTOMER' ? 'customer' : scope;
28+
const {token, mainRole} = await authService.getSessionData();
29+
gqlClient.token = token;
30+
return mainRole === 'TYPE_CUSTOMER' ? 'customer' : scope;
3231
}
3332
let scope;
3433
initScope('privateScope').then(response => {

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "0.1.0",
2+
"version": "0.2.0",
33
"license": "MIT",
44
"main": "dist/index.js",
55
"typings": "dist/index.d.ts",

0 commit comments

Comments
 (0)