即使正确地遵循了文档中的步骤,SilverStripe 4 GraphQL和GraphiQL UI也无法正常工作

问题描述

我正在使用SilverStripe 4,并使用composer require silverstripe/graphql应用了一个插件

按照https://github.com/silverstripe/silverstripe-graphql来源的silverstripe/graphql文档中的说明进行操作后,我似乎无法通过此网址{{来访问GraphiQL的{​​{1}} 1}}(silverstripe是我在htdocs中的文件名称,graphiql是UI计数器部分,将帮助我对GraphQL进行查询

GraphQL示例输出

Output for GraphiQL

使用邮递员:

POST method using Postman

GraphiQL示例输出

GraphiQL route not working

我的名字叫localhost/silverstripe/dev/graphiql

File Directory

Sample Code

还将其应用于我的GraphQL文件中:

routes.yml

我将它们放在SS\GraphQL内的routes.yml文件夹中

GraphQL

GraphQL

enter image description here

_config

enter image description here

在这里做错什么了吗?我能够从文档中复制步骤和代码 请请求您的帮助...

解决方法

好的,通过安装composer require --dev silverstripe/graphql-devtools可以回答我的查询,我可以转到localhost/silverstripe/dev/graphiql并打开以下用户界面:

GraphiQL