A GraphQL app for Loto6.49
python3 -m venv grafolo49
source venv/bin/activate
or venv/Scripts/activate.bat
pip install -r requirements.txt
To tell Flask where to start :
export FLASK_APP=app.py
And then flask run
, you should have app running on localhost.
Access the app on http://localhost:5000/graphql and then, you can search draws as
query AllDraws {
listDraws {
success
errors
draw {
draw_date
number_1
number_c
}
}
}
It is possible to limit the results by adding the parameter limit
and to order by date with ordered
boolean parameter:
query AllDraws {
listDraws(limit: 2, ordered: true) {
success
errors
draw {
draw_date
number_1
number_c
}
}
}
By default, limit
parameter is set to 10 and results are ordered by date (most recent draws first).