Instantly share code, notes, and snippets.

@kellenmace /index.js Secret
Created Nov 15, 2018

Embed
What would you like to do?
import React from "react";
import { render } from "react-dom";
import ApolloClient from "apollo-boost";
import { ApolloProvider } from "react-apollo";
import './index.css';
import PostsSearch from './PostsSearch';
const client = new ApolloClient({
// Change this to the URL of your WordPress site.
uri: "http://example.com/graphql"
});
const App = () => (
<ApolloProvider client={client}>
<div className="app">
<h2 className="title">
My first WPGraphQL & Apollo app {' '}
<span className="emoji" role="img" aria-label="rocket">🚀</span>
</h2>
<PostsSearch />
</div>
</ApolloProvider>
);
render(<App />, document.getElementById('root'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment