Install Python and setup the virtual environment
Install ariadne and uvicorn libraries
pip install ariadne "uvicorn[standard]"
To activate the virtual environment, type the following command in the terminal.
.\real-time\Scripts\Activate.ps1
If you want to leave the virtual environment, type deactivate
If yarn package is not yet installed, refer the this link to install it.
Create new package:
yarn init -y
Apollo Client:
yarn add @apollo/client graphql
Chakra UI:
yarn add @chakra-ui/react @emotion/react@^11 @emotion/styled@^11 framer-motion@^5
WebSocket:
yarn add subscriptions-transport-ws
Shrads React:
yarn add shards-react
Enter to the server folder and activate the virtual environment if you haven't.
.\real-time\Scripts\Activate.ps1
run the server
uvicorn app:app
While the server running, create another terminal and enter to the client folder and start the React app
yarn start
https://www.twilio.com/blog/graphql-api-subscriptions-python-asyncio-ariadne
https://www.apollographql.com/blog/graphql/python/complete-api-guide