Created
December 17, 2018 11:12
-
-
Save brunokrebs/9d75dc3832d4c7d15d925da26f285bfe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const client = new ApolloClient({ | |
uri: "http://localhost:4000/graphql", | |
request: operation => { | |
operation.setContext(context => ({ | |
headers: { | |
...context.headers, | |
authorization: "Bearer " + auth.getIdToken(), | |
}, | |
})); | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment