django - 如何为 django graphql 自动生成模式
问题描述
我正在研究这个项目:https ://github.com/mirumee/saleor 这个项目使用graphql,我想知道如何在这个文件夹中生成模式:https ://github.com/mirumee/saleor/tree/master/ saleor/graphql 有没有办法自动生成模式?谢谢
解决方案
使用graphql_schema
管理命令作为
python manage.py graphql_schema --schema tutorial.quickstart.schema --out schema.graphql
请注意,该--out
文件必须具有.graphql
生成GraphQL SDL表示的扩展名。
推荐阅读
- ios - prefersStatusBarHidden iOS 13 未调用
- reactjs - 我可以从 Component Did Mount 访问状态吗
- regex - 防止正则表达式跳过中间的值
- python - 如何绘制以时间序列为行的 Pandas 数据框?
- cakephp - CakePHP 3.x 翻译行为:使用“get”读取所有翻译
- python - 枚举来自源节点的 DAG 中的所有路径,仅访问一次
- javascript - Chrome 重新加载页面的方式与预期不同
- javascript - 功能上下文全局变量访问本地
- css - 将 img 放入 flex-box div 中
- javascript - 使用热键和 javascript 在 textarea 中附加文本