【文件属性】:
文件名称:todo-api-graphql:GraphQL Todo API
文件大小:5KB
文件格式:ZIP
更新时间:2021-02-12 20:44:07
Python
托多·格拉普尔
简单的GraphQL服务器,可以管理待办事项:
创建新的待办事项
提取所有待办事项
提取待办事项
将待办事项标记为已完成
更新截止日期
删除待办事项
安装
克隆和nathe回购
git clone https://github.com/alexkiura/todo-grapqhl
导航到根文件夹
cd todo-graphql
创建一个virtualenv
python3 -m venv todo_env
安装所需的软件包
pip install -r requirements.txt
运行应用
export export FLASK_APP=main
启动服务器
flask run
通过访问打开GraphQL PlayGround
将以下查询粘贴到编辑器中,然后按播放按钮以获取可用待办事项列表:
query myQuery {
todos {
【文件预览】:
todo-api-graphql-master
----api()
--------__init__.py(404B)
--------models.py(426B)
--------queries.py(811B)
--------mutations.py(2KB)
----.gitignore(55B)
----requirements.txt(556B)
----schema.graphql(690B)
----README.md(1KB)
----.graphqlconfig(310B)
----main.py(1KB)