ApolloClient setup for CreateReactApp, Authorization, Subscription

Tabvn
1 min readOct 27, 2019

Providing code for start new React App using ApolloClient

Follow document available at CreateReactApp to init your react app. And then install following modules use npm

cd myApp
npm install --save @apollo/react-hooks apollo-link apollo-link-http apollo-link-ws apollo-utilities apollo-link-context apollo-cache-inmemory apollo-client

Create Apollo Client

create a /src/client.js

Your App.js

Enjoy working with ApolloClient and see more documents available at

https://www.apollographql.com/docs/react/data/queries/

--

--

Tabvn

i’m from a nice city in Vietnam called Danang, where live and did my studies. I love programming, coffee and spending my free time teaching myself new skills.