The project uses Python's Ariadne library to integrate GraphQL.
The following are contained in the app package directory.
-
__init__.py
: Initialization file for the Flask object. -
models.py
: Database model -
views.py
: GraphQL binding and server routes
API
API uses GraphQL for CRUD functionalities.
schema.graphql
: GraphQL schema to validate data from client and resolversapi_resolvers.py
: Logic to resolve all client requests
Active virtual environment for Python.
Run pip install -e .
to install required package from setup.py file.
Create .flaskenv environment file and add the following: FLASK_APP=app
and FLASK_ENV=development
.
To start server, run flask run
in the terminal.