Created
December 15, 2018 12:18
-
-
Save himanshu-dixit/d6d337da7e9118399c675720a289814d 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
... | |
constructor(props) { | |
super(props); | |
const ACCESS_TOKEN = localStorage.getItem('access_token'); | |
this.client = new ApolloClient({ | |
uri: "https://himanshu-todo.herokuapp.com/v1alpha1/graphql", | |
headers: { | |
'Authorization': `Bearer ${ACCESS_TOKEN}`, | |
} | |
}); | |
} | |
... | |
render() { | |
return ( | |
<div> | |
<ApolloProvider client={this.client}> | |
</ApolloProvider> | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment