Skip to content

Instantly share code, notes, and snippets.

@clarencenpy
Forked from peggyrayzis/index.js
Created May 22, 2018 12:44
Show Gist options
  • Save clarencenpy/c19e232469cdcd50197c471d7174d216 to your computer and use it in GitHub Desktop.
Save clarencenpy/c19e232469cdcd50197c471d7174d216 to your computer and use it in GitHub Desktop.
import React from 'react';
import { render } from 'react-dom';
import ApolloClient from 'apollo-boost';
import { ApolloProvider } from 'react-apollo';
// Pass your GraphQL endpoint to uri
const client = new ApolloClient({
uri: 'https://nx9zvp49q7.lp.gql.zone/graphql'
});
const ApolloApp = () => (
<ApolloProvider client={client}>
<App />
</ApolloProvider>
);
render(<ApolloApp />, document.getElementById('root'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment