Skip to content
This repository has been archived by the owner on Sep 15, 2022. It is now read-only.

Latest commit

 

History

History

react

react example

This example uses:

  • create-react-app for simple React config
  • apollo-boost for simple apollo setup

Points of interest

  • apollo/client.js
    • configuration of apollo client
  • App.js
    • root component that has ApolloProvider with client
  • Cart.js
    • simple component that queries number of orders and displays them as a number
  • OrderList.js
    • component that queries all orders and displays them as lists
  • OrderList.js
    • component that queries all orders and displays them as lists
  • MarkDeliveredButton.js
    • component that uses mutation to save new orders, uses optimistic response
  • SubmitOrderButton.js
    • component that uses mutation to save new orders, uses manual cache update and optimistic response