Created
June 24, 2019 17:46
-
-
Save chris001177/b0d41b0b8b5e6aabf64aa63a8b19e90a 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
import React from 'react' | |
import ReactDOM from 'react-dom' | |
import './index.css' | |
import App from './App' | |
import registerServiceWorker from './registerServiceWorker' | |
import { ApolloProvider } from 'react-apollo' | |
import { ApolloClient, HttpLink, InMemoryCache } from 'apollo-client-preset' | |
const httpLink = new HttpLink({ uri: 'http://localhost:4000/graphql' }) | |
const client = new ApolloClient({ | |
link: httpLink, | |
cache: new InMemoryCache(), | |
}) | |
ReactDOM.render( | |
<ApolloProvider client={client}> | |
<App /> | |
</ApolloProvider>, | |
document.getElementById('root'), | |
) | |
registerServiceWorker() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment