Guest User

Untitled

a guest
Jun 24th, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. const client = new ApolloClient({
  2. uri: clientUrl,
  3. request: async operation => {
  4. const token = How_do_i_set_this <-- ???
  5. console.log('token in request', token)
  6. operation.setContext({
  7. headers: {
  8. authorization: token ? `Bearer ${token}` : ''
  9. }
  10. });
  11. }
  12. });
  13.  
  14. const App = () => (
  15. <DashAppHolder>
  16. <ApolloProvider client={client}>
  17. <Provider store={store}>
  18. <PublicRoutes history={history} />
  19. </Provider>
  20. </ApolloProvider>
  21. </DashAppHolder>
  22. );
Add Comment
Please, Sign In to add comment