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.ps1If 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.ps1run the server
uvicorn app:appWhile 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