Skip to content

Instantly share code, notes, and snippets.

@kellenmace
Last active January 29, 2019 14:59
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 kellenmace/56cf3d6a4dd0c2bf775acca1b60a6ee0 to your computer and use it in GitHub Desktop.
Save kellenmace/56cf3d6a4dd0c2bf775acca1b60a6ee0 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";
import './index.css';
import PostsSearch from './PostsSearch';
const client = new ApolloClient({
// Change this to the URL of your WordPress site.
uri: "https://www.wpgraphql.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