You are on page 1of 10

GraphQL-React-Express

Cheng Deng
Back-Expressjs – Project creation
mkdir server
cd server
npm init
npm install express
npm install nodemon -g
nodemon app – for hot change
npm install graphql express-graphql
npm install lodash
Expressjs - app.js
Back-graphql – defining db schema

Name convention:

Variable name in lowercase


Type/Class in uppercase
Resolve Fuction
Reason
Type/Class are generator of the entities. In the other words, they
are the whole set of the entities.
Enable - GraphiQL
Query
React
• facebook
/create-react-app: Set up a modern web app by running one comman
d. (github.com)
• Install create-react-app globally or use npx
• npm install –g create-react-app
• npx create-react-app my-app
• Run project
• cd my-app
• npm start
App and component
Front-React-Apollo-for-graphql
• npm install apollo-boost react-apollo graphql –save

• init
Front-React-Apollo-for-graphql - usage

You might also like