首页 > 解决方案 > 如何为 django graphql 自动生成模式

问题描述

我正在研究这个项目:https ://github.com/mirumee/saleor 这个项目使用graphql,我想知道如何在这个文件夹中生成模式:https ://github.com/mirumee/saleor/tree/master/ saleor/graphql 有没有办法自动生成模式?谢谢

标签: djangographql

解决方案


使用graphql_schema管理命令作为

python manage.py graphql_schema --schema tutorial.quickstart.schema --out schema.graphql

请注意,该--out文件必须具有.graphql生成GraphQL SDL表示的扩展名。


推荐阅读