This project provides API for order management, using Elixir, GraphQL(Absinthe), PostgreSQL.
- Install docker and run
docker-compose build - Run
docker-compose up - Visit
localhost:4040/apifrom your browser after building
Install Elixir, PostgreSQL and run mix test
- All mutations are atomic
- All IDs are UUIDs
- Query to fetch all orders
- Mutation to create an order
- Mutation to apply a payment to an order
- Mutation to order and pay in one go
- Subscriptions for all the above mutations
- Make mutations idempotent i.e if the payment is submitted twice, charge only once.
- Instead of preloading
paymentsApplied, use Dataloader/Batching to load lazily.