Example
Use
create-react-app
thenyarn add apollo-client-preset react-apollo graphql
and replace below code forindex.js
// Apollo clientconst client = link: uri: 'https://api.graph.cool/simple/v1/cixos23120m0n0173veiiwrjr' cache: // Example query from https://www.graph.cool/const MOVIE_QUERY = gql`{ Movie(id: "cixos5gtq0ogi0126tvekxo27") { id title actors { name } }}` // Our Appconst App = { const loading Movie = data // Loading if loading return <div>loading...</div> // Loaded return <p><b>Movietitle</b> : Movieactors</p>} const ApolloApp = <ApolloProvider client=client> <App /> </ApolloProvider>