-
-
Save kellenmace/56cf3d6a4dd0c2bf775acca1b60a6ee0 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 { 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