Giter Site home page Giter Site logo

apollo-client-exercise's Introduction

Apollo client exercise

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

Exercise part 1

http://ec2-52-37-127-60.us-west-2.compute.amazonaws.com:8080/graphiql

  1. Query a list of courses
  2. Query a single course by id
  3. Query a single course by $id (id is a variable)
  4. How many courses in the system?
  5. How many currencies in the system?
  6. How many types do we have in the system?

How to install

  • git clone [email protected]:alexlbr/apollo-client-exercise.git
  • cd apollo-client-exercise
  • npm install or yarn install
  • npm start

Exercise part 2

  1. Implement the query in src/voucher/graphql/Vouchers.graphql
  2. Import Vouchers.graphql in src/voucher/components/VoucherList.jsx and connect the component to the query
  3. Implement the query in src/voucher/graphql/Voucher.graphql
  4. Import Voucher.graphql in src/voucher/components/EditVoucher.jsx and connect the component to the query
  5. Implement the mutation in src/voucher/graphql/CreateVoucher.graphql
  6. Import CreateVoucher.graphql in src/voucher/components/NewVoucher.jsx and connect the component to the query
  7. Implement the mutation in src/voucher/graphql/UpdateVoucher.graphql
  8. Import UpdateVoucher.graphql in src/voucher/components/EditVoucher.jsx and connect the component to the query

License

This material is available for private, non-commercial use under the GPL version 3.

apollo-client-exercise's People

Contributors

alexlobera avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.