Created
March 4, 2018 07:40
-
-
Save akoenig/5ee50f52962a5df38e82e8c8abb15b35 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// index.js | |
import { render } from "react-dom"; | |
import { ApolloProvider } from "react-apollo"; | |
import { App } from "./App"; | |
import { createClient } from "./graphql"; | |
const $app = document.getElementById("app"); | |
const client = createClient({ | |
endpointUri: "https://api.graph.cool/...", | |
onError: error => render( | |
<MyErrorHandler error={error} /> | |
, $app) | |
}); | |
render( | |
<ApolloProvider client={client}> | |
<App /> | |
</ApolloProvider> | |
, $app); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment