This is a simple api implemented using fastapi and graphql. It uses products.json to import mock data. With the help of the api, you can query product overview, products by category and product details by product id.
Download the zip file and extract it. Please make sure you have python Installed. Thank you.
run pip install -r requirements.txt
run uvicorn main:app --reload
{ productOverview { products { name, price, category }, totalProducts, totalPrice } }
{ productDetails(id: 1) { name, price, category } }
{ productsByCategory(id: 1) { name, price, category } }