It stores your token currently in local storage ``...
# orm-help
b
It stores your token currently in local storage
Copy code
const httpLink = new HttpLink({ uri: '<http://localhost:4000>' })

const middlewareAuthLink = new ApolloLink((operation, forward) => {
  const token = localStorage.getItem(AUTH_TOKEN);
  const authorizationHeader = token ? `Bearer ${token}` : null;
  operation.setContext({
    headers: {
      authorization: authorizationHeader
    }
  })
  return forward(operation)
})