graphql - 如何在 magento graphql 上允许 GraphQL 自省
问题描述
跑步
{
__schema{
types{
name
kind
}
}
}
给
{
"errors": [
{
"message": "GraphQL introspection is not allowed, but the query contained __schema or __type",
"category": "graphql",
"locations": [
{
"line": 31,
"column": 3
}
]
}
]
}
我在 Windows 上使用 GraphiQL 到 Magento graphql 服务器。如果我graphql get-schema
使用 graphql-cli 在命令行上运行,我也会得到相同的结果。如何允许 Graphql 内省?
解决方案
您需要处于开发人员模式才能使用自省。
利用deploy:mode:set developer
推荐阅读
- javascript - 我无法使用任何形式的 JavaScript 检测 MS Explorer
- java - 在物理设备上测试时工具栏标题保持黑色
- django - Django / React Router DOM - 登陆 django 中未指定的 url
- asp.net-core - 在 asp.net core 中获取 HEIC 图像的属性
- python - 如果输入宽度和高度与调整输入和宽度的大小相同,cv2.resize() 会做什么?
- django - Django:为相关对象生成查询集,同时保留注释
- java - 如何使用 utlizie stringbuilder 添加所有其他字符并在空格处重新启动?
- reactjs - 单击搜索栏时导航到新页面
- r - R中字符串中某些动态变化之间的高级替换
- apache-spark - Apache Kafka/Spark/Streaming 方法