Final App:
http://react-apollo-recipes.herokuapp.com/
http://localhost:3000/graphiql
mutation {
addRecipe(
name: "Grilled Cheese Sandwich",
description: "A tasty sandwich",
category: "Sandwiches",
instructions: "Grill it!"
) {
name
category
description
instructions
}
}
query {
getAllRecipes {
_id
name
category
likes
createdDate
}
}
$ cd ../client/
$ npx create-react-app .
$ cd ../server/
$ npm run dev
$ cd client
$ npm install --save graphql
$ npm install --save react-apollo apollo-boost
$ npm install --save jwt-decode
mutation {
signupUser(username: "John", email: "john@gmail.com", password: "John"){
token
}
}
$ npm install --save react-router-dom
mutation($username: String!, $password: String!) {
signinUser(username: $username, password: $password){
token
}
}
query($_id:ID!) {
getRecipe(_id: $_id) {
_id
name
category
description
instructions
createdDate
likes
}
}
-- skipped
$ cd ../client/
$ npm install --save react-ckeditor-component
$ cd ../client/
$ npm install --save react-pose
http://www.davidhu.io/react-spinners/
$ cd ../client/
$ npm install --save react-spinners
Marley
Any questions on eng: https://jsdev.org/chat/
Любые вопросы на русском: https://jsdev.ru/chat/