This project implements the katapi (description below) in order to compare a GraphQL API to a REST API (https://github.com/octo-woapi/api-poc).
You can find a deploy version of this project on heroku: https://octo-woapi-graphql.herokuapp.com/graphql
$ npm install
$ npm start #default port is 4000
Then, since GraphiQL is activated, you can access it on /graphql
.
WARNING: This project is far from perfect and more for curiosity use only, refactoring in progress.
Run all tests using JEST
$ npm test
Watch mode with Nodemon
$ npm run watch
A kata to practice your API design and development skills.
This kata offers a set of features to practice your API programming skills. It covers basic HTTP verbs and codes.
Shopping API with products, orders and bills.
- Products
- Can be listed, created, updated, found by id, deleted
- Have an
identifier
,name
,price
andweight
- Products can be sorted by
name
,price
orweight
- Orders
- Can be created, listed, updated and deleted
- Have a status, a product list with a quantity per product, a shipment amount, a total amount and a weight
- Orders status can be
pending
,paid
orcanceled
- Are offered 5% discount when the price exceeds 1000€
- Shipment costs 25€ for every 10 more kg (50€ for 20kg, 75€ for 30kg, etc.)
- Bills
- Can be listed
- Have an
amount
and acreation date
- Are automatically generated when an order status is set to
paid