Skip to content

Instantly share code, notes, and snippets.

@chris001177
Created June 24, 2019 17:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chris001177/b0d41b0b8b5e6aabf64aa63a8b19e90a to your computer and use it in GitHub Desktop.
Save chris001177/b0d41b0b8b5e6aabf64aa63a8b19e90a to your computer and use it in GitHub Desktop.
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