Skip to content

Commit

Permalink
feat: allow getAuth to return a promise (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
rootman authored Jun 8, 2020
1 parent a64f183 commit ee59014
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions graphql-client/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ export function createApolloClient ({
}

// HTTP Auth header injection
authLink = setContext((_, { headers }) => {
const authorization = getAuth(tokenName)
authLink = setContext(async (_, { headers }) => {
const authorization = await getAuth(tokenName)
const authorizationHeader = authorization ? { authorization } : {}
return {
headers: {
Expand Down

0 comments on commit ee59014

Please sign in to comment.