-
Notifications
You must be signed in to change notification settings - Fork 0
Graphql playgound #8
Description
Hi,
if you want to learn how to use grapghql, this project provides a grapqhl backend (sadly in python).
To install dependencies for the backend you will have to install python as well as flask and ariadne.
- Python Download Any newer version should be okay, Select the right one for your Operating system
- Install Flask using pip You may skip the venv stuff and only do
pip install flask - Install Ardiadne and Docs Again, you may as well do
pip install ariadne
The backend can be started by going into the directory workshop-food-facts/backend and starting python backend.py (or python3 backend.py). It should start on localhost:5000.
However, the nextJS app has a route rewrite for that. So after starting the backend, you can start the NextJS app npm run dev in the workshop-food-facts/ directory and you should be able to visit localhost:3000/playground (<-- Note: NextJS webserver will do a route rewrite) and view the backend graphql Playground..
One of the first tasks would be to check how grapqhl works. Just look on YT, there are many tutorials. Then write queries in the playground to get some data. You should be able to view the schema (there is a schema button on the right side of the playground). Build some queries and get familiar with grapqhql queries. Let me know if you need help
After you feel comfortable, you can move on integrating it in React. (I will then add instructions)