Created
June 21, 2020 08:17
-
-
Save bengrunfeld/3a159d1e1e8b7259e7ff143c5bb7d72f to your computer and use it in GitHub Desktop.
GraphQL-Apollo-NextJS Starter App - pages/index.jsx
This file contains hidden or 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 { ApolloProvider } from "@apollo/react-hooks"; | |
import ApolloClient, { gql } from "apollo-boost"; | |
import { BookInfo } from "../components/BookInfo"; | |
const Home = ({ data }) => { | |
const client = new ApolloClient({ | |
uri: "http://localhost:3000/api/graphql-data", | |
}); | |
return ( | |
<ApolloProvider client={client}> | |
<div> | |
<h1>NextJS GraphQL Apollo App</h1> | |
<BookInfo /> | |
</div> | |
</ApolloProvider> | |
); | |
}; | |
export default Home; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment