File tree 3 files changed +7
-8
lines changed
3 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 7
7
runs-on : ${{ matrix.os }}
8
8
strategy :
9
9
matrix :
10
- node : ['12.x', ' 14.x']
11
- os : [ubuntu-latest, windows-latest, macOS-latest ]
10
+ node : ['14.x']
11
+ os : [ubuntu-latest]
12
12
13
13
steps :
14
14
- name : Checkout repo
Original file line number Diff line number Diff line change @@ -15,8 +15,7 @@ import React from 'react';
15
15
import ReactDOM from ' react-dom' ;
16
16
import ' ./index.less' ;
17
17
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' ;
20
19
import authService from ' ./shared/services/authService' ;
21
20
22
21
gqlClient .init ({
@@ -26,9 +25,9 @@ gqlClient.init({
26
25
});
27
26
28
27
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 ;
32
31
}
33
32
let scope;
34
33
initScope (' privateScope' ).then (response => {
Original file line number Diff line number Diff line change 1
1
{
2
- "version" : " 0.1 .0" ,
2
+ "version" : " 0.2 .0" ,
3
3
"license" : " MIT" ,
4
4
"main" : " dist/index.js" ,
5
5
"typings" : " dist/index.d.ts" ,
You can’t perform that action at this time.
0 commit comments