This repo contains some exercise to help you learn the following:
- Apollo client grapql HOC
- Pagination using Relay Cursor Connections specification
- GraphQL query and mutation
http://ec2-52-37-127-60.us-west-2.compute.amazonaws.com:8080/graphiql
- Query a list of courses
- Query a single course by id
- Query a single course by $id (id is a variable)
- How many courses in the system?
- How many currencies in the system?
- How many types do we have in the system?
git clone [email protected]:alexlbr/apollo-client-exercise.git
cd apollo-client-exercise
npm install
oryarn install
npm start
- Implement the query in src/voucher/graphql/Vouchers.graphql
- Import Vouchers.graphql in src/voucher/components/VoucherList.jsx and connect the component to the query
- Implement the query in src/voucher/graphql/Voucher.graphql
- Import Voucher.graphql in src/voucher/components/EditVoucher.jsx and connect the component to the query
- Implement the mutation in src/voucher/graphql/CreateVoucher.graphql
- Import CreateVoucher.graphql in src/voucher/components/NewVoucher.jsx and connect the component to the query
- Implement the mutation in src/voucher/graphql/UpdateVoucher.graphql
- Import UpdateVoucher.graphql in src/voucher/components/EditVoucher.jsx and connect the component to the query
This material is available for private, non-commercial use under the GPL version 3.